Interface BedWars.ArenaUtil

Enclosing interface:
BedWars

public static interface BedWars.ArenaUtil
  • Method Details

    • canAutoScale

      boolean canAutoScale(String arenaName)
      Check if an arena can be auto-scaled.
      Returns:
      always true if auto-scale is disabled.
    • addToEnableQueue

      void addToEnableQueue(IArena a)
      Add a custom arena to the enable queue.
    • removeFromEnableQueue

      void removeFromEnableQueue(IArena a)
      Remove an arena from the enable queue.
    • isPlaying

      boolean isPlaying(org.bukkit.entity.Player p)
      Check if a player is playing.
    • isSpectating

      boolean isSpectating(org.bukkit.entity.Player p)
      Check if a player is spectating.
    • loadArena

      void loadArena(String worldName, org.bukkit.entity.Player sender)
      Load an arena. Add it to the enable queue.
      Parameters:
      sender - If you want to send feedback. Use null otherwise.
    • setGamesBeforeRestart

      void setGamesBeforeRestart(int games)
      Set how many games to the next serve restart. This is used only if ServerType.BUNGEE
    • getGamesBeforeRestart

      int getGamesBeforeRestart()
      Get how many games till the next restart. This is used only if ServerType.BUNGEE
    • getArenaByPlayer

      IArena getArenaByPlayer(org.bukkit.entity.Player player)
      Get an arena by a player. Spectator or Player.
      Parameters:
      player - Target player
      Returns:
      The arena where the player is in. Can be NULL.
    • setArenaByPlayer

      void setArenaByPlayer(org.bukkit.entity.Player p, IArena arena)
      Set an arena by player if the player is in this arena.
    • removeArenaByPlayer

      void removeArenaByPlayer(org.bukkit.entity.Player p, IArena a)
      Remove
    • getArenaByName

      IArena getArenaByName(String worldName)
      Get an arena by world name
      Parameters:
      worldName - World name
    • getArenaByIdentifier

      IArena getArenaByIdentifier(String worldName)
    • setArenaByName

      void setArenaByName(IArena arena)
    • removeArenaByName

      void removeArenaByName(String worldName)
      Remove
    • getArenas

      LinkedList<IArena> getArenas()
    • vipJoin

      boolean vipJoin(org.bukkit.entity.Player p)
      Check if a player has vip join.
    • getPlayers

      int getPlayers(String group)
      Get players count for a group
    • joinRandomArena

      boolean joinRandomArena(org.bukkit.entity.Player p)
      Add a player to the most filled arena. Check if is the party owner first.
      Returns:
      true if joined.
    • joinRandomFromGroup

      boolean joinRandomFromGroup(org.bukkit.entity.Player p, String group)
      Add a player to the most filled arena from a group.
      Returns:
      true if added.
    • getEnableQueue

      LinkedList<IArena> getEnableQueue()
      Arena enable queue.
    • sendLobbyCommandItems

      void sendLobbyCommandItems(org.bukkit.entity.Player p)
      This will give the lobby items to the player. Not used in serverType BUNGEE. This will clear the inventory first.