PlayerJoinParkourEvent
PlayerJoinParkourEvent is triggered before the player is actually placed into the game, which makes it the correct hook for conditional access checks.
Technical Overview
Section titled “Technical Overview”- Cancellable: Yes
- Extends:
PlayerEvent
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
getGame() | Game | Returns the target game instance. |
getArena() | Arena | Returns the arena tied to that game. |
isCancelled() | boolean | Whether the join should be blocked. |
setCancelled(boolean) | void | Cancels or allows the join attempt. |
Usage Example
Section titled “Usage Example”@EventHandlerpublic void onJoin(PlayerJoinParkourEvent event) { if (event.getArena().getId().equalsIgnoreCase("vip") && !event.getPlayer().hasPermission("parkour.vip")) { event.setCancelled(true); }}