Class CustomGameStateChangeEvent
java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.customgame.CustomGameStateChangeEvent
Called after a published custom game changed state: its lobby was built (
WAITING), torn
down again before the start (SCHEDULED), its match started (ACTIVE), finished
(COMPLETED) or the game was called off (CANCELLED).
A notification; the change has already happened.
Main thread; only fired while a listener is registered.
- Since:
- 1.8.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhy a custom game was called off.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionCustomGameStateChangeEvent(@NotNull CustomGameInfo game, @NotNull CustomGameState previousState, @Nullable CustomGameStateChangeEvent.CancelReason cancelReason) -
Method Summary
Modifier and TypeMethodDescriptionWhy the game was called off, when the new state isCustomGameState.CANCELLED.@NotNull CustomGameInfoThe game, in its new state.static @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the handler list for this event.@NotNull CustomGameStateThe new state.@NotNull CustomGameStateThe state it was in before.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
CustomGameStateChangeEvent
public CustomGameStateChangeEvent(@NotNull @NotNull CustomGameInfo game, @NotNull @NotNull CustomGameState previousState, @Nullable @Nullable CustomGameStateChangeEvent.CancelReason cancelReason)
-
-
Method Details
-
getCustomGame
The game, in its new state. -
getPreviousState
The state it was in before. -
getNewState
The new state. -
getCancelReason
Why the game was called off, when the new state isCustomGameState.CANCELLED. -
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Description copied from class:ZentrixEventGets the handler list for this event.- Overrides:
getHandlersin classZentrixEvent- Returns:
- The handler list
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-