Class TeamAssignEvent
java.lang.Object
org.bukkit.event.Event
com.andrei1058.bedwars.api.events.gameplay.TeamAssignEvent
public class TeamAssignEvent
extends org.bukkit.event.Event
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.Eventorg.bukkit.event.Event.Result
- 
Constructor SummaryConstructorsConstructorDescriptionTeamAssignEvent(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 SummaryModifier and TypeMethodDescriptiongetArena()Get the arenastatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.entity.PlayerGet the playergetTeam()Get the teambooleanCheck if the assign was cancelledvoidsetCancelled(boolean cancelled) Cancel/ Allow the assign eventMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
TeamAssignEventCalled 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).READ THIS: If you want to assign the player another team there's no ned of a setTeam method in this event. Just use ITeam.addPlayers(Player...)right after usingsetCancelled(boolean).
 
- 
- 
Method Details- 
getTeamGet the team- Returns:
- the team assigned to the player
 
- 
getPlayerpublic org.bukkit.entity.Player getPlayer()Get the player- Returns:
- the target player
 
- 
getArenaGet the arena- Returns:
- arena
 
- 
isCancelledpublic boolean isCancelled()Check if the assign was cancelled
- 
setCancelledpublic void setCancelled(boolean cancelled) Cancel/ Allow the assign event
- 
getHandlerspublic org.bukkit.event.HandlerList getHandlers()- Specified by:
- getHandlersin class- org.bukkit.event.Event
 
- 
getHandlerListpublic static org.bukkit.event.HandlerList getHandlerList()
 
-