Skip to content

JoinAttemptEvent

Package: dev.despical.tnttag.api.events.game

JoinAttemptEvent exposes getArena() and getUser() and implements Bukkit’s Cancellable interface.

@EventHandler
public void onJoinAttempt(JoinAttemptEvent event) {
if (maintenanceApplies(event.getUser().getPlayer())) {
event.setCancelled(true);
}
}

The event runs after the command path has checked basic arena availability and permissions but before the user is fully added. Send your own explanation to the player when cancelling.