Class PlayerLeaveGameEvent

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.PlayerLeaveGameEvent

public class PlayerLeaveGameEvent extends PlayerEvent
Called immediately before a player is removed from an active TNTRun game.

The player is still registered in the game when the event is fired, and leave cleanup has not run yet. This makes the event useful for reading final in-game state before inventories, visibility, and membership are reset.

  • The player is still part of the game
  • Scores and game state are still available
  • The leave reason is available through getReason()

This event is informational and is not cancellable.

  • Constructor Details

    • PlayerLeaveGameEvent

      public PlayerLeaveGameEvent(org.bukkit.entity.Player player, Game game, PlayerLeaveGameEvent.LeaveReason reason)
      Constructs a new PlayerLeaveGameEvent.
      Parameters:
      player - the player leaving the game
      game - the game the player is leaving
      reason - the reason the player is leaving
  • 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()