Class SpectatorJoinArenaEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.SpectatorJoinArenaEvent
All Implemented Interfaces:
ArenaEvent, Cancellable

public class SpectatorJoinArenaEvent extends PlayerEvent implements ArenaEvent, Cancellable
Gets called when a player tries to enter an arena as a spectator
  • Constructor Details

    • SpectatorJoinArenaEvent

      public SpectatorJoinArenaEvent(Spectator spectator)
  • Method Details

    • getArena

      public Arena getArena()
      Returns the arena to which the player wants to join.
      Specified by:
      getArena in interface ArenaEvent
      Returns:
      The arena in which the player wants to enter
    • getSpectator

      public Spectator getSpectator()
      Returns the spectator who's trying to join.
      Returns:
      The involved spectator
    • getReason

      public SpectateReason getReason()
      Returns the reason why he got into a spectator.
      Returns:
      The reason
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean bool)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()