Interface IArena


public interface IArena
  • Method Details

    • isSpectator

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

      boolean isSpectator(UUID player)
      Check if a player is spectating on this arena.
    • isReSpawning

      boolean isReSpawning(UUID player)
      Check if a player is spectating on this arena.
    • getArenaName

      String getArenaName()
      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.
    • getConfig

      ConfigManager getConfig()
      Get arena config.
    • isPlayer

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

      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(UUID player)
      Get the team where the player has played in current match. To be used if the player was eliminated.
    • getDisplayName

      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.
    • setWorldName

      void setWorldName(String name)
      Change world name for auto-scaling.
      Parameters:
      name - new name.
    • getStatus

      GameState getStatus()
      Get arena status.
    • getPlayers

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

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

      String getGroup()
      Get arena group.
    • getMaxInTeam

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

      ConcurrentHashMap<org.bukkit.entity.Player,Integer> getRespawnSessions()
      Get list of players in respawn screen. Player is the actual player in re-spawn screen. Integer is the remaining time.
    • 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

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

      String getDisplayGroup(org.bukkit.entity.Player player)
      Get arena display group for given player.
      Returns:
      translated group.
    • getDisplayGroup

      String getDisplayGroup(Language language)
      Get arena display group for given language.
      Returns:
      translated group.
    • getTeams

      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.
    • getFireballCooldowns

      Map<UUID,Long> getFireballCooldowns()
      Gets the cooldowns for fireballs
      Returns:
      The cooldowns for fireballs
    • removePlacedBlock

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

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

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

      @Nullable @Nullable GameStatsHolder getStatsHolder()
      Session stats.
      Returns:
      stats container for this game.
    • getPlayerBedsDestroyed

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

      List<org.bukkit.block.Block> getSigns()
      Get the join signs for this arena
      Returns:
      signs.
    • getIslandRadius

      int getIslandRadius()
      Get the island radius
    • setGroup

      void setGroup(String group)
    • setStatus

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

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

      @Deprecated default boolean isRespawning(org.bukkit.entity.Player p)
      Deprecated.
      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

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

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

      @Deprecated ITeam getPlayerTeam(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

      @Deprecated void addPlayerDeath(org.bukkit.entity.Player p)
      Deprecated.
      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(String name)
      Get a team by name
    • getStartingTask

      StartingTask getStartingTask()
    • getPlayingTask

      PlayingTask getPlayingTask()
    • getRestartingTask

      RestartingTask getRestartingTask()
    • getOreGenerators

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

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

      @Deprecated int getPlayerDeaths(org.bukkit.entity.Player p, boolean finalDeaths)
      Deprecated.
      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

      LinkedList<org.bukkit.util.Vector> getPlaced()
      List of placed blocks.
    • destroyData

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

      int getUpgradeDiamondsCount()
    • getUpgradeEmeraldsCount

      int getUpgradeEmeraldsCount()
    • getRegionsList

      List<Region> getRegionsList()
    • getShowTime

      ConcurrentHashMap<org.bukkit.entity.Player,Integer> getShowTime()
      Get invisibility for armor
    • setAllowSpectate

      void setAllowSpectate(boolean allowSpectate)
    • isAllowSpectate

      boolean isAllowSpectate()
    • getWorldName

      String getWorldName()
    • getRenderDistance

      int getRenderDistance()
      Get player render distance in blocks.
    • startReSpawnSession

      boolean startReSpawnSession(org.bukkit.entity.Player player, int seconds)
      Put a player in re-spawning countdown.
      Parameters:
      player - target player.
      seconds - countdown in seconds. 0 for instant re-spawn.
      Returns:
      false if the player is not actually in game or if is in another re-spawn session.
    • isReSpawning

      boolean isReSpawning(org.bukkit.entity.Player player)
      Check if a player is in re-spawning screen/ countdown.
    • getReSpawnLocation

      org.bukkit.Location getReSpawnLocation()
      Get re-spawning screen location.
    • getSpectatorLocation

      org.bukkit.Location getSpectatorLocation()
      Where spectators will spawn.
    • getWaitingLocation

      org.bukkit.Location getWaitingLocation()
      Location where to spawn at join (waiting/ starting).
    • isProtected

      boolean isProtected(org.bukkit.Location location)
      Check if the given location is protected. Border checks, regions, island spawn protection, npc protections, generator protections.
    • abandonGame

      void abandonGame(org.bukkit.entity.Player player)
      This is triggered when a player has abandoned a game. This should remove its assist from existing team and re-join session. This does not replace removePlayer(Player, boolean).
    • getYKillHeight

      int getYKillHeight()
      -1 won't handle void kill. Instant kill when player y is under this number.
    • getStartTime

      Instant getStartTime()
    • getTeamAssigner

      ITeamAssigner getTeamAssigner()
    • setTeamAssigner

      void setTeamAssigner(ITeamAssigner teamAssigner)
    • getLeavingPlayers

      List<org.bukkit.entity.Player> getLeavingPlayers()
    • isAllowMapBreak

      boolean isAllowMapBreak()
      Check if breaking map is allowed, otherwise only placed blocks are allowed. Some blocks like have a special protections, like blocks under shopkeepers, bed, ecc.
    • setAllowMapBreak

      void setAllowMapBreak(boolean allowMapBreak)
      Toggle map block break rule.
    • isTeamBed

      boolean isTeamBed(org.bukkit.Location location)
      Check if there is a player bed at given location.
    • getBedsTeam

      @Nullable @Nullable ITeam getBedsTeam(org.bukkit.Location location)
      Get owner team of a bed based on location.
    • getWinner

      @Nullable @Nullable ITeam getWinner()
      Provides the winner team. This is populated on restarting phase.