Class ScenarioVoteStartEvent
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.ScenarioVoteStartEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public final class ScenarioVoteStartEvent
extends ZentrixGameEvent
implements org.bukkit.event.Cancellable
A match's scenario vote is opening.
Listeners may narrow or widen the eligible pool and change the duration. Cancelling skips the vote entirely, in which case the configured no-vote rule decides what the match runs — the match is never left waiting.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionScenarioVoteStartEvent(@NotNull ZentrixGame game, @NotNull Set<String> eligible, int durationSeconds) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEligible(@NotNull String scenarioId) intThe mutable pool players will be able to vote for.static @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the handler list for this event.booleanbooleanremoveEligible(@NotNull String scenarioId) voidsetCancelled(boolean cancelled) voidsetDurationSeconds(int durationSeconds) Shortens or extends the vote.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
-
ScenarioVoteStartEvent
public ScenarioVoteStartEvent(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull Set<String> eligible, int durationSeconds)
-
-
Method Details
-
getEligible
The mutable pool players will be able to vote for. -
addEligible
-
removeEligible
-
getDurationSeconds
public int getDurationSeconds() -
setDurationSeconds
public void setDurationSeconds(int durationSeconds) Shortens or extends the vote. Values below one second are clamped up. -
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()
-