Class GameStopEvent
java.lang.Object
org.bukkit.event.Event
dev.despical.whackme.api.event.WhackMeEvent
dev.despical.whackme.api.event.game.GameEvent
dev.despical.whackme.api.event.game.GameStopEvent
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.-
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, List<UUID> stoppedPlayers) Creates a game stop event. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListReturns an immutable snapshot of players affected by the stop.Returns the reason the game was stopped.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
GameStopEvent
Creates a game stop event.- Parameters:
game- game that was stoppedstopReason- reason that triggered the stopstoppedPlayers- players attached before cleanup
-
-
Method Details
-
getStopReason
-
getStoppedPlayers
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-