Class GameStopEvent

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

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

The active user has already been detached from the Game. Use getStoppedPlayers() to identify the affected player and getStopReason() to distinguish administrative stops, reloads, shutdowns, and arena deletion.

 @EventHandler
 public void onGameStop(GameStopEvent event) {
     audit.log(event.getStopReason(), event.getStoppedPlayers());
 }
 
API note: The stopped-player list is an immutable snapshot captured before cleanup. A stop event is not a normal completion and does not apply run statistics.
  • Constructor Details

    • GameStopEvent

      public GameStopEvent(Game game, StopReason stopReason, List<UUID> stoppedPlayers)
      Creates a game stop event.
      Parameters:
      game - game that was stopped
      stopReason - reason that triggered the stop
      stoppedPlayers - players attached before cleanup
  • Method Details

    • getStopReason

      public StopReason getStopReason()
      Returns the reason the game was stopped.
      Returns:
      stop reason
    • getStoppedPlayers

      public List<UUID> getStoppedPlayers()
      Returns an immutable snapshot of players affected by the stop.
      Returns:
      stopped player UUIDs
    • 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()