Class PlayerJoinArenaEvent

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

public class PlayerJoinArenaEvent extends PlayerEvent implements ArenaEvent
Gets called when a player joins an arena
  • Constructor Details

  • Method Details

    • getCause

      public AddPlayerCause getCause()
      Returns what has made the player to join the arena.
      Returns:
      The cause of the player entering the arena
    • getTeam

      @Nullable public @Nullable Team getTeam()
      Returns the team to which the player is automatically getting added to. Can be null when the player isn't in any team.
      Returns:
      The team of the player, might be null
    • setTeam

      public void setTeam(@Nullable @Nullable Team team)
      Set the team to which the player shall automatically get added to. Can be null when he shouldn't be added to one.
      Parameters:
      team - His new team
    • hasIssues

      public boolean hasIssues()
      Returns if the player has any issues entering the arena.
      Returns:
      If there are issues which cause the player not being able to enter the arena
    • getIssues

      public Set<AddPlayerIssue> getIssues()
      Returns all issues there are for the player to enter the arena.
      Returns:
      The issues why the player can't enter the arena
    • addIssue

      public boolean addIssue(AddPlayerIssue issue)
      Adds an issue which causes the player to not be able to enter the arena.
      Parameters:
      issue - The issue that shall be added
      Returns:
      false if that issue already existed before
    • removeIssue

      public boolean removeIssue(AddPlayerIssue issue)
      Removes an issue. If all were removed the player will be able to enter the arena.
      Parameters:
      issue - The issue that shall be removed
      Returns:
      true if it has been removed
    • getHandlers

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

      public static HandlerList getHandlerList()