Class ScenarioSelectionLockEvent
java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.ZentrixGameEvent
dev.itsharshxd.zentrix.api.events.scenario.ScenarioSelectionLockEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public final class ScenarioSelectionLockEvent
extends ZentrixGameEvent
implements org.bukkit.event.Cancellable
A match is about to lock its scenarios in.
This is the last moment the set can be changed. Listeners may add or remove IDs through
getScenarioIds(); Zentrix validates whatever is left, so a change that breaks a
dependency or introduces a conflict is corrected rather than honoured blindly.
Cancelling makes the match run no scenarios at all. It never stops the match itself.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionScenarioSelectionLockEvent(@NotNull ZentrixGame game, @NotNull ScenarioSelection proposed) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a scenario to the set.static @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the handler list for this event.@NotNull ScenarioSelectionThe selection Zentrix arrived at, before any listener changed it.The mutable set that will be locked in, subject to validation.booleanbooleanRemoves a scenario from the set.voidsetCancelled(boolean cancelled) Methods inherited from class dev.itsharshxd.zentrix.api.events.ZentrixGameEvent
getArenaName, getGame, getGameId, getGameState, getGameTypeName, getPlayerCount, getRuntimeId, getSourceArenaNameMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
ScenarioSelectionLockEvent
public ScenarioSelectionLockEvent(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull ScenarioSelection proposed)
-
-
Method Details
-
getProposed
The selection Zentrix arrived at, before any listener changed it. -
getScenarioIds
The mutable set that will be locked in, subject to validation. -
add
Adds a scenario to the set. -
remove
Removes a scenario from the set. -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Description copied from class:ZentrixGameEventGets the handler list for this event.- Overrides:
getHandlersin classZentrixGameEvent- Returns:
- The handler list
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-