Class ScenarioVoteCastEvent

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.ScenarioVoteCastEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public final class ScenarioVoteCastEvent extends ZentrixGameEvent implements org.bukkit.event.Cancellable
A player is casting or withdrawing a scenario vote.

Cancelling rejects the vote; the player keeps whatever they had voted for before.

Since:
1.6.0
  • Constructor Details

    • ScenarioVoteCastEvent

      public ScenarioVoteCastEvent(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String scenarioId, boolean withdrawal)
  • Method Details

    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
    • getScenarioId

      @NotNull public @NotNull String getScenarioId()
    • isWithdrawal

      public boolean isWithdrawal()
      Whether the player is taking a vote back rather than casting one.
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: ZentrixGameEvent
      Gets the handler list for this event.
      Overrides:
      getHandlers in class ZentrixGameEvent
      Returns:
      The handler list
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()