Class GameStopEvent
java.lang.Object
org.bukkit.event.Event
dev.despical.tntrun.api.event.TNTRunEvent
dev.despical.tntrun.api.event.game.GameEvent
dev.despical.tntrun.api.event.game.GameStopEvent
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGameStopEvent(Game game, StopReason stopReason) Constructs a new GameStopEvent.GameStopEvent(Game game, StopReason stopReason, List<UUID> stoppedPlayers) Constructs a new GameStopEvent. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
GameStopEvent
Constructs a new GameStopEvent.- Parameters:
game- the game instancestopReason- the reason for stopping the game
-
GameStopEvent
Constructs a new GameStopEvent.- Parameters:
game- the game instancestopReason- the reason for stopping the gamestoppedPlayers- players that were in the game before cleanup
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-