Skip to content

PlayerJoinParkourEvent

PlayerJoinParkourEvent is triggered before the player is actually placed into the game, which makes it the correct hook for conditional access checks.


  • Cancellable: Yes
  • Extends: PlayerEvent

MethodReturn TypeDescription
getGame()GameReturns the target game instance.
getArena()ArenaReturns the arena tied to that game.
isCancelled()booleanWhether the join should be blocked.
setCancelled(boolean)voidCancels or allows the join attempt.

@EventHandler
public void onJoin(PlayerJoinParkourEvent event) {
if (event.getArena().getId().equalsIgnoreCase("vip")
&& !event.getPlayer().hasPermission("parkour.vip")) {
event.setCancelled(true);
}
}