Class GameStopEvent
java.lang.Object
org.bukkit.event.Event
dev.despical.kotl.api.events.KOTLEvent
dev.despical.kotl.api.events.game.GameEvent
dev.despical.kotl.api.events.game.GameStopEvent
Called after a KOTL game has been stopped and its players have been cleaned
up.
Scoreboards and boss bars have been removed, inventories and player state have been restored where possible, players have been teleported to the configured end location, and the game's player set is empty.
Use getStoppedPlayers() to inspect the immutable snapshot of players
who were part of the game before cleanup. This event is useful for external
logging, administration integrations, and arena lifecycle tracking.
This event is informational and is not cancellable.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGameStopEvent(@NotNull Game game, @NotNull StopReason reason) Constructs a game stop event without a player snapshot.GameStopEvent(@NotNull Game game, @NotNull StopReason reason, @NotNull List<UUID> stoppedPlayers) Constructs a new game stop event. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.event.HandlerListReturns the static Bukkit handler list for this event type.@NotNull org.bukkit.event.HandlerListReturns the Bukkit handler list for this event type.@NotNull StopReasonReturns why the game was stopped.Returns the immutable UUID snapshot captured before player cleanup.toString()Returns a compact debug representation of the stopped game.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
GameStopEvent
Constructs a game stop event without a player snapshot.- Parameters:
game- the game that was stoppedreason- the reason for stopping the game
-
GameStopEvent
public GameStopEvent(@NotNull @NotNull Game game, @NotNull @NotNull StopReason reason, @NotNull @NotNull List<UUID> stoppedPlayers) Constructs a new game stop event.- Parameters:
game- the game that was stoppedreason- the reason for stopping the gamestoppedPlayers- players that were present before cleanup
-
-
Method Details
-
getReason
Returns why the game was stopped.- Returns:
- the stop reason
-
getStoppedPlayers
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Returns the Bukkit handler list for this event type.- Specified by:
getHandlersin classorg.bukkit.event.Event- Returns:
- this event's handler list
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()Returns the static Bukkit handler list for this event type.- Returns:
- this event's handler list
-
toString
-