Class TeamAssignEvent


  • public class TeamAssignEvent
    extends org.bukkit.event.Event
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.bukkit.event.Event

        org.bukkit.event.Event.Result
    • Constructor Summary

      Constructors 
      Constructor Description
      TeamAssignEvent​(org.bukkit.entity.Player player, ITeam team, IArena arena)
      Called for each player when the waiting countdown == 0 You can cancel each team assign event in order to manage them yourself but make sure to set BedWarsTeam#setBedDestroyed(false) if teams are marked as eliminated when they are not, and use BedWarsTeam#firstSpawn(p) to spawn them.
    • Method Summary

      Modifier and Type Method Description
      IArena getArena()
      Get the arena
      static org.bukkit.event.HandlerList getHandlerList()  
      org.bukkit.event.HandlerList getHandlers()  
      org.bukkit.entity.Player getPlayer()
      Get the player
      ITeam getTeam()
      Get the team
      boolean isCancelled()
      Check if the assign was cancelled
      void setCancelled​(boolean cancelled)
      Cancel/ Allow the assign event
      • Methods inherited from class org.bukkit.event.Event

        getEventName, isAsynchronous
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TeamAssignEvent

        public TeamAssignEvent​(org.bukkit.entity.Player player,
                               ITeam team,
                               IArena arena)
        Called for each player when the waiting countdown == 0 You can cancel each team assign event in order to manage them yourself but make sure to set BedWarsTeam#setBedDestroyed(false) if teams are marked as eliminated when they are not, and use BedWarsTeam#firstSpawn(p) to spawn them. But first assign them to a team BedWarsTeam#addPlayers(p)
    • Method Detail

      • getTeam

        public ITeam getTeam()
        Get the team
        Returns:
        the team assigned to the player
      • getPlayer

        public org.bukkit.entity.Player getPlayer()
        Get the player
        Returns:
        the target player
      • getArena

        public IArena getArena()
        Get the arena
        Returns:
        arena
      • isCancelled

        public boolean isCancelled()
        Check if the assign was cancelled
      • setCancelled

        public void setCancelled​(boolean cancelled)
        Cancel/ Allow the assign event
      • getHandlers

        public org.bukkit.event.HandlerList getHandlers()
        Specified by:
        getHandlers in class org.bukkit.event.Event
      • getHandlerList

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