Class GameEndEvent

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

public class GameEndEvent extends GameEvent
Called after a TNTRun game finishes and enters the ending phase.

This event is fired after the winner and placements have been calculated, summary messages have been sent, players have been moved back to the start location, statistics have been applied, and arena records have been updated. At this point:

  • Final scores and placements are finalized
  • The winner and top-three rankings are available
  • Players are still part of the game while the ending timer counts down

This event is useful for rewards, external integrations, post-game logging, or custom end-game effects.

API note: players may leave the game before the ending timer expires.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields inherited from class GameEvent

    game
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new GameEndEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    @NotNull Map<UUID,Integer>
    Returns the Top 3 players and their final scores.
    @Nullable User
    Returns the winning user of the game.

    Methods inherited from class GameEvent

    getArena, 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
  • Constructor Details

    • GameEndEvent

      public GameEndEvent(Game game)
      Constructs a new GameEndEvent.
      Parameters:
      game - the game that has finished
  • Method Details

    • getWinner

      @Nullable public @Nullable User getWinner()
      Returns the winning user of the game.
      Returns:
      the User who won the game, or null if no winner exists
    • getTop3

      @NotNull public @NotNull Map<UUID,Integer> getTop3()
      Returns the Top 3 players and their final scores.
      Returns:
      an immutable map of UUID to score values
    • 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()