Class PlayerJoinAttemptEvent
java.lang.Object
org.bukkit.event.Event
dev.despical.tntrun.api.event.TNTRunEvent
dev.despical.tntrun.api.event.player.PlayerEvent
dev.despical.tntrun.api.event.player.PlayerJoinAttemptEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Fired when a player attempts to join a TNTRun game.
This event is called before the player is added to the target Game.
It is fired for both normal player joins and spectator joins. Cancelling it
prevents the join and leaves the player outside the game.
Typical use cases:
- Checking permissions, parties, cooldowns, or queue state
- Blocking joins for custom arena conditions
- Logging or announcing join attempts
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPlayerJoinAttemptEvent(org.bukkit.entity.Player player, Game game) Constructs a new PlayerJoinAttemptEvent.PlayerJoinAttemptEvent(org.bukkit.entity.Player player, Game game, boolean spectatorJoin) Constructs a new PlayerJoinAttemptEvent. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListMethods inherited from class PlayerEvent
getUser, toStringMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronousMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PlayerJoinAttemptEvent
Constructs a new PlayerJoinAttemptEvent.- Parameters:
player- the player attempting to joingame- the target game
-
PlayerJoinAttemptEvent
Constructs a new PlayerJoinAttemptEvent.- Parameters:
player- the player attempting to joingame- the target gamespectatorJoin- whether the player will join as a spectator
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-