PlayerLeaveParkourEvent
PlayerLeaveParkourEvent is useful when you need to distinguish between natural finishes, manual exits, kicks, or server-side interruptions.
Technical Overview
Section titled “Technical Overview”- Cancellable: No
- Extends:
PlayerEvent
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
getGame() | Game | Returns the game being left. |
getArena() | Arena | Returns the arena being left. |
getReason() | Reason | Returns why the player left. |
Leave Reasons
Section titled “Leave Reasons”The current reason enum contains:
FINISHLEAVE_COMMANDLEAVE_ITEMKICKQUITRELOADSHUTDOWNSTOP_COMMANDARENA_DELETED
Usage Example
Section titled “Usage Example”@EventHandlerpublic void onLeave(PlayerLeaveParkourEvent event) { if (event.getReason() == PlayerLeaveParkourEvent.Reason.FINISH) { event.getPlayer().sendMessage("Run saved successfully."); }}