Interface IArena


  • public interface IArena
    • Method Detail

      • isSpectator

        boolean isSpectator​(org.bukkit.entity.Player player)
        Check if a player is spectating on this arena.
      • getWorldName

        java.lang.String getWorldName()
        Get used world name.
      • init

        void init​(org.bukkit.World world)
        Initialize the arena after loading the world. This needs to be called in order to allow players to join.
      • isPlayer

        boolean isPlayer​(org.bukkit.entity.Player player)
        Check if user is playing.
      • getSpectators

        java.util.List<org.bukkit.entity.Player> getSpectators()
        Get a list of spectators.
      • getTeam

        ITeam getTeam​(org.bukkit.entity.Player player)
        Get the player's team. This will work if the player is alive only.

        Use getExTeam(UUID) to get the team where the player has played in current match.

      • getExTeam

        ITeam getExTeam​(java.util.UUID player)
        Get the team where the player has played in current match. To be used if the player was eliminated.
      • getDisplayName

        java.lang.String getDisplayName()
        Get the arena name as a message that can be used on signs etc.
        Returns:
        A string with - and _ replaced by a space.
      • getStatus

        GameState getStatus()
        Get arena status.
      • getPlayers

        java.util.List<org.bukkit.entity.Player> getPlayers()
        Get players in arena.
      • getMaxPlayers

        int getMaxPlayers()
        Get maximum allowed players amount.
      • getGroup

        java.lang.String getGroup()
        Get arena group.
      • getMaxInTeam

        int getMaxInTeam()
        Get maximum players allowed in a team.
      • getRespawn

        java.util.concurrent.ConcurrentHashMap<org.bukkit.entity.Player,​java.lang.Integer> getRespawn()
        Get list of players in respawn screen.
      • updateSpectatorCollideRule

        void updateSpectatorCollideRule​(org.bukkit.entity.Player p,
                                        boolean collide)
        Disable spectator collisions.
        Parameters:
        p - - spectator. Use false when the spectator got removed from the arena.
      • updateNextEvent

        void updateNextEvent()
        This will attempt to upgrade the next event if it is the case.
      • addPlayer

        boolean addPlayer​(org.bukkit.entity.Player p,
                          boolean skipOwnerCheck)
        Add a player to the arena
        Parameters:
        p - - Player to add.
        skipOwnerCheck - - True if you want to skip the party checking for this player. This
        Returns:
        true if was added.
      • addSpectator

        boolean addSpectator​(org.bukkit.entity.Player p,
                             boolean playerBefore,
                             org.bukkit.Location staffTeleport)
        Add a player as Spectator
        Parameters:
        p - Player to be added
        playerBefore - True if the player has played in this arena before and he died so now should be a spectator.
      • removePlayer

        void removePlayer​(org.bukkit.entity.Player p,
                          boolean disconnect)
        Remove a player from the arena
        Parameters:
        p - Player to be removed
        disconnect - True if the player was disconnected
      • removeSpectator

        void removeSpectator​(org.bukkit.entity.Player p,
                             boolean disconnect)
        Remove a spectator from the arena
        Parameters:
        p - Player to be removed
        disconnect - True if the player was disconnected
      • reJoin

        boolean reJoin​(org.bukkit.entity.Player p)
        Rejoin an arena
        Returns:
        true if can rejoin
      • disable

        void disable()
        Disable the arena. This will automatically kick/ remove the people from the arena.
      • restart

        void restart()
        Restart the arena.
      • getWorld

        org.bukkit.World getWorld()
        Get the arena world
      • getDisplayStatus

        java.lang.String getDisplayStatus​(Language lang)
        Get the display status for an arena. A message that can be used on signs etc.
      • getTeams

        java.util.List<ITeam> getTeams()
      • addPlacedBlock

        void addPlacedBlock​(org.bukkit.block.Block block)
        Add placed block to cache. So players will be able to remove blocks placed by players only.
      • removePlacedBlock

        void removePlacedBlock​(org.bukkit.block.Block block)
        Remove placed block.
      • isBlockPlaced

        boolean isBlockPlaced​(org.bukkit.block.Block block)
      • getPlayerKills

        int getPlayerKills​(org.bukkit.entity.Player p,
                           boolean finalKills)
        Get a player kills count.
        Parameters:
        p - Target player
        finalKills - True if you want to get the Final Kills. False for regular kills.
      • getPlayerBedsDestroyed

        int getPlayerBedsDestroyed​(org.bukkit.entity.Player p)
        Get the player beds destroyed count
        Parameters:
        p - Target player
      • getSigns

        java.util.List<org.bukkit.block.BlockState> getSigns()
        Get the join signs for this arena
      • getIslandRadius

        int getIslandRadius()
        Get the island radius
      • setGroup

        void setGroup​(java.lang.String group)
      • setStatus

        void setStatus​(GameState status)
        Set game status without starting stats.
      • changeStatus

        void changeStatus​(GameState status)
        Change game status starting tasks.
      • isRespawning

        boolean isRespawning​(org.bukkit.entity.Player p)
        Check if target player is in re-spawning screen.
      • addSign

        void addSign​(org.bukkit.Location loc)
        Add a join sign for the arena.
      • refreshSigns

        void refreshSigns()
        Refresh signs.
      • addPlayerKill

        void addPlayerKill​(org.bukkit.entity.Player p,
                           boolean finalKill,
                           org.bukkit.entity.Player victim)
        Add a kill point to the game stats.
      • addPlayerBedDestroyed

        void addPlayerBedDestroyed​(org.bukkit.entity.Player p)
        Add a destroyed bed point to the player temp stats.
      • getPlayerTeam

        @Deprecated
        ITeam getPlayerTeam​(java.lang.String playerName)
        Deprecated.
        Get arena by player name. Used to get the team for a player that has left the arena. Make sure the player is in this arena first.
      • checkWinner

        void checkWinner()
        Check winner. Will check if the game has a winner in certain conditions. Manage your win conditions. Call the arena restart and the needed stuff.
      • addPlayerDeath

        void addPlayerDeath​(org.bukkit.entity.Player p)
        Add a kill to the player temp stats.
      • setNextEvent

        void setNextEvent​(NextEvent nextEvent)
        Set next event for the arena.
      • getNextEvent

        NextEvent getNextEvent()
        Get next event.
      • sendPreGameCommandItems

        void sendPreGameCommandItems​(org.bukkit.entity.Player p)
        This will give the pre-game command Items. This will clear the inventory first.
      • sendSpectatorCommandItems

        void sendSpectatorCommandItems​(org.bukkit.entity.Player p)
        This will give the spectator command Items. This will clear the inventory first.
      • getTeam

        ITeam getTeam​(java.lang.String name)
        Get a team by name
      • getOreGenerators

        java.util.List<IGenerator> getOreGenerators()
        Get Ore Generators.
      • getNextEvents

        java.util.List<java.lang.String> getNextEvents()
        Get the list of next events to come. Not ordered.
      • getPlayerDeaths

        int getPlayerDeaths​(org.bukkit.entity.Player p,
                            boolean finalDeaths)
        Get player deaths.
      • sendDiamondsUpgradeMessages

        void sendDiamondsUpgradeMessages()
        Show upgrade announcement to players. Change diamondTier value first.
      • sendEmeraldsUpgradeMessages

        void sendEmeraldsUpgradeMessages()
        Show upgrade announcement to players. Change emeraldTier value first.
      • getPlaced

        @Deprecated
        java.util.LinkedList<org.bukkit.block.Block> getPlaced()
        Deprecated.
        List of placed blocks.
      • destroyData

        void destroyData()
        This is used to destroy arena data when it restarts.
      • getUpgradeDiamondsCount

        int getUpgradeDiamondsCount()
      • getUpgradeEmeraldsCount

        int getUpgradeEmeraldsCount()
      • getRegionsList

        java.util.List<Region> getRegionsList()
      • getShowTime

        java.util.concurrent.ConcurrentHashMap<org.bukkit.entity.Player,​java.lang.Integer> getShowTime()
        Get invisibility for armor
      • setAllowSpectate

        void setAllowSpectate​(boolean allowSpectate)
      • isAllowSpectate

        boolean isAllowSpectate()