interactionEnded
Tells your gamemode that a use ended, finished or cut short. It is no longer in
interactions.listAll.
Signature
Section titled “Signature”server.on("interactionEnded", ({ interaction, reason }) => void)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
interaction |
Interaction |
The use. |
reason |
InteractionEndReason |
Why it ended. |
Example
Section titled “Example”import { server } from "nativemp";
server.on("interactionEnded", ({ interaction, reason }) => { if (reason !== "completed") server.log(`player ${interaction.playerId} stopped early (${reason})`);});Related
Section titled “Related”interactionStarted: the use beganinteractions.stop: end a useplayerStartInteractionRequest: decide whether a player may use it