Class GameStopEvent

java.lang.Object
org.bukkit.event.Event

public class GameStopEvent extends GameEvent
Called after a TNTRun game has been forcefully stopped and cleaned up.

This event is fired after stop cleanup has run:

  • Scoreboards and boss bars have been removed
  • Players have been restored and teleported to the configured end location
  • Visibility, inventory, health, food, flight, and potion effects have been reset
  • The game's active user list has been cleared

Since the active user list is empty at this point, use getStoppedPlayers() to inspect the players that were part of the game before cleanup.

The game normally transitions into GameState.RESTARTING after this event unless the server is reloading or shutting down.

  • Constructor Details

    • GameStopEvent

      public GameStopEvent(Game game, StopReason stopReason)
      Constructs a new GameStopEvent.
      Parameters:
      game - the game instance
      stopReason - the reason for stopping the game
    • GameStopEvent

      public GameStopEvent(Game game, StopReason stopReason, List<UUID> stoppedPlayers)
      Constructs a new GameStopEvent.
      Parameters:
      game - the game instance
      stopReason - the reason for stopping the game
      stoppedPlayers - players that were in the game before cleanup
  • 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()