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

public class PlayerJoinAttemptEvent extends PlayerEvent implements 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

    Constructors
    Constructor
    Description
    PlayerJoinAttemptEvent(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 Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     

    Methods inherited from class PlayerEvent

    getUser, toString

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bukkit.event.Cancellable

    isCancelled, setCancelled
  • Constructor Details

    • PlayerJoinAttemptEvent

      public PlayerJoinAttemptEvent(org.bukkit.entity.Player player, Game game)
      Constructs a new PlayerJoinAttemptEvent.
      Parameters:
      player - the player attempting to join
      game - the target game
    • PlayerJoinAttemptEvent

      public PlayerJoinAttemptEvent(org.bukkit.entity.Player player, Game game, boolean spectatorJoin)
      Constructs a new PlayerJoinAttemptEvent.
      Parameters:
      player - the player attempting to join
      game - the target game
      spectatorJoin - whether the player will join as a spectator
  • Method Details

    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()