Interface BedWars.ArenaUtil

  • Enclosing interface:
    BedWars

    public static interface BedWars.ArenaUtil
    • Method Detail

      • 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​(java.lang.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​(java.lang.String worldName)
        Get an arena by world name
        Parameters:
        worldName - World name
      • setArenaByName

        void setArenaByName​(IArena arena)
      • removeArenaByName

        void removeArenaByName​(java.lang.String worldName)
        Remove
      • getArenas

        java.util.LinkedList<IArena> getArenas()
      • vipJoin

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

        int getPlayers​(java.lang.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,
                                    java.lang.String group)
        Add a player to the most filled arena from a group.
        Returns:
        true if added.
      • getEnableQueue

        java.util.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.