Class GameStateChangeEvent
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.GameStateChangeEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Called immediately before a TNTRun game changes state.
The game is still in the old state when this event is fired. Cancelling the event prevents the new state from being applied, so the target state's first tick will not run.
Typical use cases:
- Blocking a transition under custom conditions
- Logging state changes for analytics or debugging
- Running custom logic before a state handler starts
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGameStateChangeEvent(Game game, GameState oldState, GameState newState) Constructs a new GameStateChangeEvent. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronousMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
GameStateChangeEvent
-
-
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()
-