Interface Arena

All Superinterfaces:
Metadatable, PersistentStorage.Holder

public interface Arena extends Metadatable, PersistentStorage.Holder
An arena is a place where a match may happen and effectively the handler of a match. There are multiple things that define an arena:
- The status (getStatus()) describing what exactly the arena is doing at a given moment
- The type/regeneration type (getRegenerationType()) the form of the arena
- Various properties, such as the name, authors, teams, spawners...
Those are needed to have a working match.
  • Method Details

    • getName

      String getName()
      Returns the unique name of the arena.
      Returns:
      Returns the actual name of the arena
    • setName

      boolean setName(String name)
      Changes the name of the arena.

      Operation can fail when there's already an arena with the name or when the name is invalid. Use GameAPI.isArenaNameValid(String) to check if the name is valid

      Parameters:
      name - The new name
      Returns:
      Returns whether it was successful or not
    • getDisplayName

      String getDisplayName()
      Returns the non-unique name of the arena for displaying to players

      Uses the custom name if one is configured, otherwise uses getName()

      Returns:
      The name of the arena used in displays
    • isCustomNameEnabled

      boolean isCustomNameEnabled()
      Returns whether this arena has a custom name enabled that'll be displayed (getDisplayName()) in favor of the actual name (getName()).
      Returns:
      true when the feature is being used with this arena
    • setCustomNameEnabled

      void setCustomNameEnabled(boolean customNameEnabled)
      Set whether this arena has a custom name enabled that'll be displayed (getDisplayName()) in favor of the actual name (getName()).
      Parameters:
      customNameEnabled - true causes this feature to get enabled for this arena
    • getCustomName

      String getCustomName()
      Returns the custom name of the arena.

      Keep this mind that this method always returns a non-null value, meaning that internally there's always one, even if isCustomNameEnabled() returns false.

      Returns:
      The custom name.
    • setCustomName

      void setCustomName(String customName)
      Set the custom name of the arena.

      You might want to use setCustomNameEnabled(boolean) as well.

      Parameters:
      customName - The new custom name.
    • getStatus

      ArenaStatus getStatus()
      Returns the current state of the arena
      Returns:
      The current state of the arena
    • setStatus

      void setStatus(ArenaStatus status)
      Not only changes the status, but also does operations depending on the status.

      Examples:
      - Enables regeneration process with ArenaStatus.RESETTING
      - Starting the match with ArenaStatus.RUNNING
      It may NOT support this for all operations

      Parameters:
      status - The new status
      Throws:
      IllegalStateException - When trying to set it to ArenaStatus.RUNNING and certain conditions (not in lobby, no players) aren't met
    • getRegenerationType

      RegenerationType getRegenerationType()
      Returns the regeneration type aka the form/variant of the arena.
      Returns:
      The regeneration type of the arena
    • setRegenerationType

      void setRegenerationType(RegenerationType type)
      This method allows you to change the form of the arena
      Parameters:
      type - The new regeneration type
    • getApproxRegenerationTime

      double getApproxRegenerationTime()
      This method calculates an approximate duration of the regeneration of an arena.

      The returned value might be far away from the real time. It might return Double.NaN when it's not possible to calculate it at the given moment.

      Returns:
      The estimated time in seconds of how long it'll take to regenerate the arena
    • getEnabledTeams

      Set<Team> getEnabledTeams()
      Returns every team that has been enabled for this arena.
      Returns:
      All added teams
    • setTeamEnabled

      boolean setTeamEnabled(Team team, boolean enabled)
      Enables or disables a team in this arena.

      Disabling an arena can cause some data to disappear, such as the location of their beds.
      It's not possible to enable or disable an arena while getStatus() returns anything other than ArenaStatus.STOPPED.

      Parameters:
      team - The team that shall be enabled or disabled
      enabled - The new state
      Returns:
      If a change was done. Might return false when the new state is equal to the old state or some conditions aren't given
    • isTeamEnabled

      boolean isTeamEnabled(Team team)
      Returns whether or not a team is enabled.
      Parameters:
      team - The team we want to check
      Returns:
      true if it's enabled
    • getBedLocation

      @Nullable @Nullable XYZD getBedLocation(Team team)
      Returns the location the team's bed location.

      Might return null if it hasn't been set yet or when the team hasn't been added.

      The world that's being used is getGameWorld().

      Parameters:
      team - The team that owns the bed
      Returns:
      The location of the bed. Might return null
      See Also:
    • getBedParts

      Block[] getBedParts(Team team)
      Returns the blocks of all the team's bed parts.

      A bed usually persists of two parts: the head and the body. The actually structure may vary depending on the bed material that is being used. This method returns the locations of all bed parts.

      Length might be 0 if no bed has been added.

      Parameters:
      team - The team that owns the bed
      Returns:
      All the locations/blocks of the bed parts
      See Also:
    • setBedLocation

      boolean setBedLocation(Team team, @Nullable @Nullable XYZD loc)
      Sets the bed location of a team.

      This won't automatically replace the bed when the game is running.

      The world that's being used is getGameWorld().

      The operation might fail when the given team hasn't been added to the arena.

      Parameters:
      team - The team that owns the bed
      loc - The location of the bed, null if it shall be removed in the storage
      Returns:
      true if the operation was successful
    • isBedDestroyed

      boolean isBedDestroyed(Team team)
      Returns whether the bed of a team has been destroyed.

      This only returns the internal state. The bed blocks might still be there.

      Parameters:
      team - The team that owns the bed
      Returns:
      If it has been destroyed or not
    • getBedDestructionTime

      @Nullable @Nullable Instant getBedDestructionTime(Team team)
      Get the time when the bed of a team has been destroyed in ms.
      Parameters:
      team - The team that owns the bed
      Returns:
      The time in ms of when the bed has been destroyed. May be null if it hasn't been destroyed yet
    • getBedHologram

      @Nullable @Nullable HologramEntity getBedHologram(Team team)
      Gets the hologram that is optionally being spawned above the team's bed.

      Hologram may be used to e.g. display the state of the bed. May be null if e.g. the round hasn't started yet or it has been disabled.

      Parameters:
      team - The team of the bed
      Returns:
      The hologram above the bed. May be null
    • getTeamSpawn

      @Nullable @Nullable XYZYP getTeamSpawn(Team team)
      Gets the spawn point of a team. Actual spawn point might vary as the location might be blocked by a block.

      It's possible that this method returns null when the team hasn't been added yet or the spawn point hasn't been set.

      The world that's being used is getGameWorld().

      Parameters:
      team - The team we want to obtain it from
      Returns:
      The location of their spawn. Might return null
    • setTeamSpawn

      boolean setTeamSpawn(Team team, @Nullable @Nullable XYZYP loc)
      Set the spawn point of a team.

      The world that's being used is getGameWorld().

      The operation might fail when the given team hasn't been added to the arena.

      Parameters:
      team - The team that will teleport at that location
      loc - The new location, use null to remove it from the storage
      Returns:
      true when the operation was successful
    • getUpgradeState

      @Nullable @Nullable UpgradeState getUpgradeState(Team team)
      Returns the UpgradeState of a specified team
      Parameters:
      team - The team we want to get the UpgradeState from
      Returns:
      The UpgradeState for the team. May be null if the arena is not running
    • getTeamBaseOnlyEffects

      List<PotionEffect> getTeamBaseOnlyEffects(Team team)
      Returns effects applied to a team around their base
      Parameters:
      team - The team that we are getting the effects from
      Returns:
      A list of potion effects that are being applied
    • getTeamPermanentEffects

      List<PotionEffect> getTeamPermanentEffects(Team team)
      Returns all effects applied to a team everywhere
      Parameters:
      team - The team that we are getting the effects from
      Returns:
      A list of potion effects that are being applied
    • addTeamEffect

      void addTeamEffect(Team team, boolean baseOnly, PotionEffectType potionEffectType, int amplifier)
      Adds an effect for all the players in a certain team
      Parameters:
      team - The team the effect should be added to
      baseOnly - Whether the effect is only active inside a teams base
      potionEffectType - the effect that should be given
      amplifier - How strong the effect is
    • removeTeamEffect

      boolean removeTeamEffect(Team team, PotionEffectType potionEffectType)
      Removes an effect from a team
      Parameters:
      team - The team we will try and remove the effect from
      potionEffectType - The effect type that should be removed
      Returns:
      true when one equal instance has been found and removed
    • getTeamEnchantments

      List<TeamEnchantment> getTeamEnchantments(Team team)
      Returns all team enchantments applied to a team
      Parameters:
      team - The team we want to obtain it from
      Returns:
      A list of team enchantments the team owns
    • addTeamEnchantment

      void addTeamEnchantment(Team team, TeamEnchantment teamEnchantment)
      Adds a team enchantment to a team, and applies it to team players
      Parameters:
      team - The team that the new enchantment is for
      teamEnchantment - The new team enchantment being applied
    • removeTeamEnchantment

      boolean removeTeamEnchantment(Team team, TeamEnchantment teamEnchantment)
      Removes a team enchantment from a team, and applies it to team players
      Parameters:
      team - The team that we are removing the enchantment from
      teamEnchantment - The team enchantment that is being removed
      Returns:
      true when one equal instance has been found and removed
    • placeBed

      void placeBed(Team team)
      Tries to place the bed of a team.

      This method also modifies the internal state of the bed (basically revives the team). This operation is being done silently, meaning the players won't be notified about this.

      Bed blocks are being placed async, if the Spigot version supports it. This means that it is theoretically not possible to immediately check the block type immediately after calling this method.

      Parameters:
      team - The team that owns the bed
      See Also:
    • destroyBed

      void destroyBed(Team team)
      Tries to break/destroy the bed of a team.

      This method also modifies the internal state of the bed (basically causes the team to not being able to respawn). This operation is being done silently, meaning the players won't be notified about this.

      Bed blocks are being destroyed async, if the Spigot version supports it. This means that it is theoretically not possible to immediately check the block type immediately after calling this method.

      Parameters:
      team - The team that owns the bed
      See Also:
    • placeBedBlocks

      void placeBedBlocks(Team team)
      Tries to place the bed blocks of a team, but not change the internal state.

      Bed blocks are being placed async, if the Spigot version supports it. This means that it is theoretically not possible to immediately check the block type immediately after calling this method.

      Parameters:
      team - The team from whom the bed blocks shall be destroyed
      See Also:
    • destroyBedBlocks

      void destroyBedBlocks(Team team)
      Tries to break/destroy the bed blocks of a team, but not change the internal state.

      Bed blocks are being destroyed async, if the Spigot version supports it. This means that it is theoretically not possible to immediately check the block type immediately after calling this method.

      Parameters:
      team - The team from whom the bed blocks shall be destroyed
      See Also:
    • destroyBedNaturally

      @Nullable default @Nullable ArenaBedBreakEvent destroyBedNaturally(Team team, @Nullable @Nullable Player player)
      Will destroy the bed as if a player actually broke it ingame.
      Parameters:
      team - The team that owns the bed
      player - The player who broke it. May be null if its unknown
      Returns:
      The event containing the result. May be null if the bed was already broken, or if the bed hasn't been placed yet
      See Also:
    • destroyBedNaturally

      @Nullable @Nullable ArenaBedBreakEvent destroyBedNaturally(BedDestructionInfo info)
      Will destroy the bed as if a player actually broke it ingame.
      Parameters:
      info - An info object containing information about the bed destruction
      Returns:
      The event containing the result. May be null if the bed was already broken, or if the bed hasn't been placed yet
    • getAuthors

      String[] getAuthors()
      Returns the authors of the arena.
      Returns:
      The authors or creators of the arena
    • getDisplayedAuthors

      String getDisplayedAuthors(@Nullable @Nullable CommandSender sender)
      Returns all authors in a string split up by a comma.

      E.g. it might return: "Notch, Marcel, Obama"
      Returns "nobody" in the language of the sender if there are none

      Parameters:
      sender - Returns in the language of this sender
      Returns:
      The authors of the arena represented in a string
    • getDisplayedAuthors

      String getDisplayedAuthors()
      Returns all authors in a string split up by a comma.

      E.g. it might return: "Notch, Marcel, Obama"
      Returns "nobody" in the configured default language if there are none

      Returns:
      The authors of the arena represented in a string
    • addAuthor

      void addAuthor(String author)
      Adds an author.
      Parameters:
      author - The author that shall be added
    • addAuthors

      void addAuthors(Collection<String> authors)
      Adds multiple authors.
      Parameters:
      authors - The authors that shall be added
    • removeAuthor

      boolean removeAuthor(String author)
      Removes an author.
      Parameters:
      author - The author that shall be removed
      Returns:
      false if there's no author with that name
    • removeAllAuthors

      int removeAllAuthors()
      Removes all existing authors.
      Returns:
      The amount of authors that have been removed
    • getMaxPlayers

      int getMaxPlayers()
      Calculates [teams amount] x [players per team] when using a normal arena.

      It'll take the configured one when using a voting arena

      Returns:
      The maximum amount of players who can join at the same time
    • getMinPlayers

      int getMinPlayers()
      Returns the minimum amount of players that are needed to start match.

      While it's not logical to have less than two, it's still legal to have any number (even one that is a minus number).

      Returns:
      The minimum amount of players needed to start a game
    • setMinPlayers

      void setMinPlayers(int minPlayers)
      Set the minimum amount of players that are needed to start a match.

      While it's not logical to have less than two, it's still legal to have any number (even one that is a minus number).

      Parameters:
      minPlayers - The new minimum amount of players needed to start a game
    • getPlayersPerTeam

      int getPlayersPerTeam()
      Returns the amount of players that can be in a team.

      When the arena is RegenerationType.VOTING then it'll return the max amount of players in the arena

      Returns:
      The configured amount of players that can be in a team
    • setPlayersPerTeam

      void setPlayersPerTeam(int playersPerTeam)
      Set the amount of players that can be in a team.

      When the arena is RegenerationType.VOTING, then it'll set the max amount of players in the arena

      Parameters:
      playersPerTeam - The new configured amount of players that can be in a team
    • getGameWorld

      @Nullable @Nullable World getGameWorld()
      Returns the world in which the arena is located at.
      Returns:
      Might return null if the world doesn't exist
    • getGameWorldName

      String getGameWorldName()
      Returns the name of the world in which the game is located at.
      Returns:
      The configured world name in which the arena is located at
    • setGameWorldName

      void setGameWorldName(@Nullable @Nullable String name)
      Set the name of the world in which the game is located at. Use null to reset it back to default (to remove it).
      Parameters:
      name - The new game world. null to reset it back to default
    • getMinRegionCorner

      @Nullable @Nullable XYZ getMinRegionCorner()
      An arena of the type RegenerationType.REGION has two corners. This method returns the point with the lowest (Math.min(int, int) number.

      It returns null if no points have been set or when the type is not RegenerationType.REGION.

      Returns:
      The lower corner of the cubic arena. Possibly null
    • getMaxRegionCorner

      @Nullable @Nullable XYZ getMaxRegionCorner()
      An arena of the type RegenerationType.REGION has two corners. This method returns the point with the greatest (Math.max(int, int) number.

      It returns null if no points have been set or when the type is not RegenerationType.REGION.

      Returns:
      The greater corner of the cubic arena. Possibly null
    • setRegionCorners

      void setRegionCorners(XYZ pos1, XYZ pos2)
      An arena of the type RegenerationType.REGION has two corners. This method sets them.

      Important:
      This does not automatically save the blocks of the arena. You likely want to run runRegenerationBlocksSavingProcess(Consumer) afterwards.

      You may not pass null as an argument. Use unsetRegionCorners() if you want to remove them.

      Parameters:
      pos1 - The points of the first corner
      pos2 - The points of the second corner
    • unsetRegionCorners

      void unsetRegionCorners()
      Removes any set corners in the arena.

      Keep in mind that the arena gets unplayable by this.

    • setGameWorld

      void setGameWorld(@Nullable @Nullable World world)
      Sets the world in which the game is located at.

      Important:
      This does not automatically save the blocks of the arena. You likely want to run runRegenerationBlocksSavingProcess(Consumer) afterwards.

      Parameters:
      world - The new world, possibly null to unset it
    • getLobbyLocation

      @Nullable @Nullable Location getLobbyLocation()
      The lobby location which can be set with /bw arena setlobby
      Returns:
      Might return null when no lobby has been set
    • getPlayersInTeam

      List<Player> getPlayersInTeam(@Nullable @Nullable Team team)
      Returns a List of all players that are in a specific team.

      You may pass null to look for players that haven't picked a team (works only during lobby).

      Parameters:
      team - The team in which the players are. null to find players who haven't picked a team
      Returns:
      All players that are inside the given team
    • getAliveTeams

      List<Team> getAliveTeams()
      Returns a List of all teams that still have a bed.

      Note this will not return teams that have no players but are still alive because of solo reconnect. If you want to get teams that currently have players online, use getTeamsWithPlayers().

      Returns:
      All currently involved teams in the match
    • getAliveTeams

      List<Team> getAliveTeams(Player... ignorePlayers)
      Returns a List of all teams that have at least one player.

      Use ignorePlayers to ignore these players in the result. Meaning it'll return all teams minus ignorePlayers that have at least one player. Note this will not return teams that have no players but are still alive because of solo reconnect. If you want to get teams that currently have players online, use getTeamsWithPlayers(Player...).

      Parameters:
      ignorePlayers - Will ignore these teams in the result and act as if they weren't ingame
      Returns:
      All currently involved teams in the match
    • getTeamsWithPlayers

      List<Team> getTeamsWithPlayers()
      Returns a List of all teams that have at least one player.

      Note this will not return teams that have at least one player, however it it possible teams are still alive because of solo reconnect. If you want to get all teams that still have a bed, use getAliveTeams().

      Returns:
      All currently involved teams in the match
    • getTeamsWithPlayers

      List<Team> getTeamsWithPlayers(Player... ignorePlayers)
      Returns a List of all teams that have at least one player.

      Use ignorePlayers to ignore these players in the result. Meaning it'll return all teams minus ignorePlayers that have at least one player. Note this will not return teams that have at least one player, however it it possible teams are still alive because of solo reconnect. If you want to get all teams that still have a bed, use getAliveTeams(Player...).

      Parameters:
      ignorePlayers - Will ignore these teams in the result and act as if they weren't ingame
      Returns:
      All currently involved teams in the match
    • setLobbyLocation

      void setLobbyLocation(@Nullable @Nullable Location location)
      Set the location for the lobby to which the players will be teleported at when they join the arena.
      Parameters:
      location - The new location where the lobby is located at
    • hasLobbyLocation

      default boolean hasLobbyLocation()
      Returns whether a location for the lobby has been set.
      Returns:
      Whether a lobby location has been set yet
    • getIcon

      ItemStack getIcon()
      Gets the icon of the arena.
      Returns:
      The icon that's being used in GUIs
    • setIcon

      void setIcon(ItemStack icon)
      Set the new icon for the arena.
      Parameters:
      icon - The new icon that'll be used in GUIs
    • getSpawners

      Collection<Spawner> getSpawners()
      Returns a collection of all added spawners
      Returns:
      All added spawners
    • addSpawner

      Spawner addSpawner(XYZ location, DropType type)
      Adds a spawner to the arena
      Parameters:
      location - The location of the spawner
      type - Info about what it shall drop
      Returns:
      The spawner instance with information about it
    • getSpawnersAtLocation

      Spawner[] getSpawnersAtLocation(IntXYZ location)
      Returns all spawners that are located at that block/location
      Parameters:
      location - The location at which they are located at
      Returns:
      All spawners at that location
    • getSpawnersAtLocation

      Spawner[] getSpawnersAtLocation(XYZ location)
      Returns all spawners that are located at that block/location
      Parameters:
      location - The location at which they are located at
      Returns:
      All spawners at that location
    • getSpawnersAtLocation

      Spawner[] getSpawnersAtLocation(Location location)
      Returns all spawners that are located at that block/location
      Parameters:
      location - The location at which they are located at
      Returns:
      All spawners at that location
    • addPlayer

      @Nullable default @Nullable AddPlayerIssue addPlayer(Player player)
      Same as addPlayer(Player, Team, AddPlayerCause), but player won't join any team automatically and passes AddPlayerCause.PLUGIN as the reason for the player joining the arena.
      Parameters:
      player - The player who shall enter the arena
      Returns:
      Returns if it was successful, and if not what caused it
    • addPlayer

      @Nullable default @Nullable AddPlayerIssue addPlayer(Player player, @Nullable @Nullable Team team)
      Same as addPlayer(Player, Team, AddPlayerCause), passes AddPlayerCause.PLUGIN as the reason for the player joining the arena.
      Parameters:
      player - The player who shall enter the arena
      team - The team it shall automatically enter. If null is given then he won't join any team
      Returns:
      Returns if it was successful, and if not what caused it
    • addPlayer

      @Nullable @Nullable AddPlayerIssue addPlayer(Player player, @Nullable @Nullable Team team, AddPlayerCause cause)
      Tries to add the player to the arena.

      Doesn't send a message in the chat and only works while getStatus() returns ArenaStatus.LOBBY,

      Parameters:
      player - The player who shall enter the arena
      team - The team it shall automatically enter. If null is given then he won't join any team
      cause - What has made the player to join the arena. Preferably you want to use AddPlayerCause.PLUGIN
      Returns:
      Returns if it was successful, and if not what caused it
      Throws:
      IllegalStateException - When the state of the arena isn't ArenaStatus.LOBBY or when the player isn't online
    • rejoinPlayer

      @Nullable @Nullable RejoinPlayerIssue rejoinPlayer(Player player)
      Tries to make the player rejoin an already active game.

      Keep in mind that the player has to be an active player on the match before and that the state is ArenaStatus.RUNNING.

      Parameters:
      player - The player who shall be readded to the game
      Returns:
      The issue that prevents him from rejoining. null when there wasn't any
    • rejoinPlayer

      @Nullable @Nullable RejoinPlayerIssue rejoinPlayer(Player player, @Nullable @Nullable QuitPlayerMemory memory)
      Tries to make the player rejoin an already active game using some rejoin info contained in the memory.

      * Keep in mind that the player has to be an active player on the match before (doesn't have to be when memory is not null) and that the state is ArenaStatus.RUNNING. *

      Parameters:
      player - The player who shall be readded to the game
      memory - The info stored before he left the match. May be a custom instance. When null, then it tries to obtain its internal stored info
      Returns:
      The issue that prevents him from rejoining. null when there wasn't any
    • kickPlayer

      default boolean kickPlayer(Player player)
      Does the same as kickPlayer(Player, KickReason), but passes KickReason.PLUGIN as the reason.
      Parameters:
      player - The player who shall get kicked
      Returns:
      Returns false if the player isn't playing inside the arena, otherwise true
    • kickPlayer

      boolean kickPlayer(Player player, KickReason reason)
      Kicks the player from the arena. Won't kick spectators.
      Parameters:
      player - The player who shall get kicked
      reason - Reason why he got kicked
      Returns:
      Returns false if the player isn't playing inside the arena, otherwise true
    • kickAllPlayers

      default int kickAllPlayers()
      Does the same as kickAllPlayers(KickReason), but uses KickReason.PLUGIN as the reason.
      Returns:
      The amount of players that have been kicked
    • kickAllPlayers

      default int kickAllPlayers(KickReason reason)
      Kicks every player who's currently inside the arena.

      Spectators won't get kicked by this method.

      Parameters:
      reason - Reason why they got kicked
      Returns:
      The amount of players that have been kicked
    • getPlayerTeam

      @Nullable @Nullable Team getPlayerTeam(Player player)
      Returns the team of a player. Can return null when the player isn't actually inside the arena or when he hasn't been added to a team (only possible during lobby phase).
      Parameters:
      player - The player we want to check
      Returns:
      The team of the player, might be null
    • setPlayerTeam

      void setPlayerTeam(Player player, @Nullable @Nullable Team team)
      Change the team of a player.

      It's okay to pass null as the team if you want to remove him from any, but this only works during the lobby phase.

      Note that nothing happen if the team reached the getPlayersPerTeam() amount.

      Parameters:
      player - The player whose team we want to change
      team - His new team
      Throws:
      IllegalStateException - When passing null as the team outside the lobby phase
    • moveToTeamDuringLobby

      boolean moveToTeamDuringLobby(Player player, Team team)
      Simulates as if the player would manually want to change the team. Sends messages etc. if it was successful or something went wrong.
      Parameters:
      player - The player whos team we want to change
      team - His new team
      Returns:
      true if his team changed, false if not
    • getPlayers

      Collection<Player> getPlayers()
      Returns all players (except spectators) who are inside the lobby.
      Returns:
      All players who are currently inside the arena. Spectators are not included
    • getQuitPlayerMemories

      Collection<QuitPlayerMemory> getQuitPlayerMemories()
      Returns all memories/infos of all players who were playing in the game but left.

      Is empty when the game is not running anymore and doesn't contain instances of players who rejoined.

      Returns:
      All memories of players who left a running match
    • getQuitPlayerMemory

      @Nullable @Nullable QuitPlayerMemory getQuitPlayerMemory(UUID playerUUID)
      Returns all memory/infos of a player who has left a running match.
      Parameters:
      playerUUID - The id of the player
      Returns:
      The memory of the player. null when there isn't any
    • addSpectator

      @Nullable default @Nullable Spectator addSpectator(Player player)
      Parameters:
      player - The player who shall spectate the arena
      Returns:
      An instance that contains spectating informations about the player. Null if failed because he's already spectating or something
    • addSpectator

      @Nullable @Nullable Spectator addSpectator(Player player, SpectateReason reason)
      Adds a player as a spectator.

      Should only be done when the arena is running, otherwise problems might occur.

      Parameters:
      player - The player who shall spectate the arena
      reason - What caused the player to be a spectator
      Returns:
      An instance that contains spectating informations about the player. Null if failed because he's already spectating or something
    • getSpectateData

      @Nullable @Nullable Spectator getSpectateData(Player player)
      Looks and returns the spectator data of the player.

      Also checks if the arena is equivalent to this one and returns null if it's not.

      Parameters:
      player - The player it should look up from
      Returns:
      The spectate data from the player. Null if the player isn't spectating
    • getSpectators

      Collection<Player> getSpectators()
      Returns every player who's currently spectating this arena.
      Returns:
      All players who are currently spectating the arena
    • getEverySpectatorData

      Collection<Spectator> getEverySpectatorData()
      Returns the spectator data of every player who's currently spectating this arena
      Returns:
      The spectate data of all players who are spectating
    • kickAllSpectators

      default int kickAllSpectators()
      Does the same as kickAllSpectators(KickSpectatorReason), but uses KickSpectatorReason.PLUGIN as the reason.
      Returns:
      The amount of players that have been kicked
    • kickAllSpectators

      default int kickAllSpectators(KickSpectatorReason reason)
      Kicks every spectator of this arena
      Parameters:
      reason - Reason why they got kicked
      Returns:
      The amount of players that have been kicked
    • broadcast

      void broadcast(String message)
      Sends this message to every player and spectator
      Parameters:
      message - The message that shall get sent
    • broadcast

      void broadcast(Message message)
      Sends this message to every player and spectator
      Parameters:
      message - The message that shall get sent
    • broadcast

      void broadcast(VarSound sound)
      Plays the sound to every player and spectator
      Parameters:
      sound - The sound that shall get played
    • isInside

      boolean isInside(Location location)
      Checks whether the given location is inside the arena.

      Always returns false for non-normal arenas (RegenerationType.isNormal())

      Parameters:
      location - The location we want to check
      Returns:
      If the location is inside the arena
    • isInside

      boolean isInside(XYZ location)
      Checks whether the given location is inside the arena.

      Always returns false for non-normal arenas (RegenerationType.isNormal()). Keep in mind that it'll always return true for RegenerationType.WORLD. You might want to use isInside(Location) for a more precise response.

      Parameters:
      location - The location we want to check
      Returns:
      If the location is inside the arena
    • isInside

      boolean isInside(IntXYZ location)
      Checks whether the given location is inside the arena.

      Always returns false for non-normal arenas (RegenerationType.isNormal()). Keep in mind that it'll always return true for RegenerationType.WORLD. You might want to use isInside(Location) for a more precise response.

      Parameters:
      location - The location we want to check
      Returns:
      If the location is inside the arena
    • getRoundStartTime

      @Nullable @Nullable Instant getRoundStartTime()
      Returns the time when the arena changed the last time its state to ArenaStatus.RUNNING.

      May be null if no match has been played on this arena since server start.

      Returns:
      The time when the last match has started. May be null
    • getRoundStopTime

      @Nullable @Nullable Instant getRoundStopTime()
      Returns the time when the arena has ended (forceful state changes don't count).

      May be null if the arena hasn't ended yet or it got into the ArenaStatus.LOBBY state.

      Returns:
      The time when the last match has ended. May be null
    • getRunningTime

      @Nullable @Nullable Duration getRunningTime()
      Get the time since the current match is running or how long the last has match.

      May be null if no match has started on this arena since server start.

      Returns:
      The time the arena is already running. May be null
    • updateScoreboard

      void updateScoreboard()
      Forcefully update the scoreboard for any player and spectator
    • remove

      boolean remove()
      Removes the arena and kicks all playing players + spectators.

      Might fail when the arena has already been removed or a plugin cancells the operation via the ArenaDeleteEvent.

      Returns:
      true when the operation was successful
    • getLobbyTimeRemaining

      double getLobbyTimeRemaining()
      Returns how much time is left until the game starts (ArenaStatus.LOBBY) or until all players get kicked (ArenaStatus.END_LOBBY). Might return -1 when the status isn't ArenaStatus.isLobby() or when the timer isn't running (e.g. not enough players in the lobby).
      Returns:
      The time remaining for the lobby showdown. -1 if the requirements aren't met.
    • setLobbyTimeRemaining

      boolean setLobbyTimeRemaining(double value, boolean instant)
      Set the new time until the lobby showdown is being executed.

      Might fail when the state isn't ArenaStatus.LOBBY.

      Parameters:
      value - The new time until the lobby showdown is being executed
      instant - For the expbar animation. If false it'll "slide" from the current value to the new value
      Returns:
      If the change has been applied
    • getIngameTimeRemaining

      int getIngameTimeRemaining()
      Returns how much time is left (in seconds) until an active match is ending.

      The state has to be ArenaStatus.RUNNING and the timer has to actually be active (isIngameTimerTicking()), otherwise this method returns -1.

      Returns:
      The time in ticks until a match is ending. -1 when the timer isn't running
    • setIngameTimeRemaining

      void setIngameTimeRemaining(int timeInSeconds)
      Set the time (in seconds) until an active match is ending.
      Parameters:
      timeInSeconds - The new time in seconds
    • isIngameTimerTicking

      boolean isIngameTimerTicking()
      Returns whether or not currently the ingame timer is countding down
      Returns:
      true when the ingame timer is currently active
    • setLobbyTimeRemaining

      default boolean setLobbyTimeRemaining(double value)
      Set the new time until the lobby showdown is being executed.

      Might fail when the state isn't ArenaStatus.LOBBY.

      This method is similar to setLobbyTimeRemaining(double, boolean), but passes true to the instant parameter.

      Parameters:
      value - The new time until the lobby showdown is being executed
      Returns:
      If the change has been applied
    • teleportHere

      void teleportHere(Player player, boolean sendMessage)
      Teleports the player inside this arena. It has the same effect as if you'd write /bw arena tp.
      Parameters:
      player - The player who shall get teleported
      sendMessage - If it shall send a success/error message to the player error not.
      See Also:
    • teleportHere

      default void teleportHere(Player player)
      Teleports the player inside this arena. It has the same effect as if you'd write /bw arena tp.

      This method is similar to teleportHere(Player, boolean), but won't display any success or error message to the player.

      Parameters:
      player - The player who shall get teleported
      See Also:
    • teleport

      void teleport(Player player, Location target)
      Usually the plugin prevents players from getting teleported and automatically kicks them from the game if they try to. If that's the case depends on the configuration of the player (more exact on the kick-outofarena config).
      Parameters:
      player - The player who shall get teleported
      target - The location to which he shall get teleported to
    • setBlockPlayerPlaced

      void setBlockPlayerPlaced(Block block, boolean newState)
      There are configurations which limit the block breaking to blocks that have been placed by players. Using this method you're able to mark blocks as player placed. Use GameAPI.isPlayerBlockMarkingSupported() to check if it's enabled.
      Parameters:
      block - The block that shall be marked/unmarked as player-placed
      newState - true if it has been placed by a player
      See Also:
    • isBlockPlayerPlaced

      boolean isBlockPlayerPlaced(Block block)
      There are configurations which limit the block breaking to blocks that have been placed by players. Using this method you'll be able to check if a block has been placed by a player. Use GameAPI.isPlayerBlockMarkingSupported() to check if has been enabled by the user, otherwise this method always returns false.
      Parameters:
      block - The block that shall be checked
      Returns:
      true if it has been placed by a player
      See Also:
    • canPlaceBlockAt

      boolean canPlaceBlockAt(Location loc, @Nullable @Nullable Material blockMaterial)
      Returns whether a player would be able to place a block at a specific location. Generally the plugin limits the places where it's possible to place a block, you may use this method to identify where it is or not.

      You may pass the material of the block that'd theoretically be placed at the given location. It's not possible to place some certain types of materials, passing a non-null value will make the check more strict. Make sure it's actually a Material for a block, and not one for an item as it'll be more likely that the check will fail in that case.

      Keep in mind that it won't actually place the block. You may use the following example for simulating a block that's being placed by a player:

      
       Arena arena = ...;
       Block target = ...;
       Material newMaterial = Material.STONE;
      
       if (arena.canPlaceBlockAt(target, newMaterial)) {
           target.setType(newMaterial);
           arena.setBlockPlayerPlaced(target, true);
       }
       
      Parameters:
      loc - The location of the theoretical block
      blockMaterial - (Optional) the material of the block that'd theoretically be placed. Use null to not check that as well
      Returns:
      true when a player could place a block at the given location
    • canPlaceBlockAt

      default boolean canPlaceBlockAt(Block block, @Nullable @Nullable Material blockMaterial)
      Returns whether a player would be able to place a block at a specific location. Generally the plugin limits the places where it's possible to place a block, you may use this method to identify where it is or not.

      You may pass the material of the block that'd theoretically be placed at the given location. It's not possible to place some certain types of materials, passing a non-null value will make the check more strict. Make sure it's actually a Material for a block, and not one for an item as it'll be more likely that the check will fail in that case.

      Keep in mind that it won't actually place the block. You may use the following example for simulating a block that's being placed by a player:

      
       Arena arena = ...;
       Block target = ...;
       Material newMaterial = Material.STONE;
      
       if (arena.canPlaceBlockAt(target, newMaterial)) {
           target.setType(newMaterial);
           arena.setBlockPlayerPlaced(target, true);
       }
       
      Parameters:
      block - The theoretical block
      blockMaterial - (Optional) the material of the block that'd theoretically be placed. Use null to not check that as well
      Returns:
      true when a player could place a block at the given location
    • canPlaceBlockAt

      default boolean canPlaceBlockAt(Location loc)
      Returns whether a player would be able to place a block at a specific location. Generally the plugin limits the places where it's possible to place a block, you may use this method to identify where it is or not.

      You might want to use canPlaceBlockAt(Location, Material) to additionally check whether it's possible to place a certain material of a block.

      Parameters:
      loc - The location of the theoretical block
      Returns:
      true when a player could place a block at the given location
    • canPlaceBlockAt

      default boolean canPlaceBlockAt(Block block)
      Returns whether a player would be able to place a block at a specific location. Generally the plugin limits the places where it's possible to place a block, you may use this method to identify where it is or not.

      You might want to use canPlaceBlockAt(Block, Material) to additionally check whether it's possible to place a certain material of a block.

      Parameters:
      block - The theoretical block
      Returns:
      true when a player could place a block at the given location
    • getItemsGivenOnSpawn

      Collection<ItemStack> getItemsGivenOnSpawn(Player player, Team team, boolean firstSpawn, boolean includeKeepOnDeath)
      Returns all the ItemStacks that will be given to a player when they spawn with all dyes already applied, and enchantments added.
      Parameters:
      player - the player that the list of items should be generated for
      team - the team the items shall be generated for (used for dyeing, and getting team upgrade enchants)
      firstSpawn - if we are assuming this is a first spawn or a respawn
      includeKeepOnDeath - if the list should include keep-on-death items
      Returns:
      all the ItemStacks that would be given to the player when they spawn
    • formatItemStack

      ItemStack formatItemStack(ItemStack itemStack, @Nullable @Nullable Player player, Team team)
      Returns the same ItemStack but possibly dyed or enchanted depending on team upgrades, and previous player purchases.
      Parameters:
      itemStack - the ItemStack we want team characteristics to be applied to
      player - the player that the item should be formatted for (used to gather correct enchants)
      team - the team the item should be formatted for (used to apply dyes, and gather team upgrade enchants)
      Returns:
      the formatted version of the same ItemStack
    • canPlayerBypassTrap

      boolean canPlayerBypassTrap(Player player)
      Whether or not a player can bypass team traps
      Parameters:
      player - the player we are checking
      Returns:
      whether or not they have the ability to bypass traps
    • isPlayerTrapBypassKeepOnDeath

      boolean isPlayerTrapBypassKeepOnDeath(Player player)
      Whether or not the players ability to bypass teams traps will remain if they die. Will also return false if the player does not currently have the ability
      Parameters:
      player - the player we are checking
      Returns:
      if the ability to bypass traps is kept on death
    • removePlayerTrapBypass

      void removePlayerTrapBypass(Player player)
      Removes a player's ability to bypass team traps
      Parameters:
      player - the player who is losing the ability to bypass traps
    • addPlayerTrapBypass

      void addPlayerTrapBypass(Player player, boolean keepOnDeath)
      Gives a player the ability to bypass team traps
      Parameters:
      player - the player gaining the ability to bypass team traps
      keepOnDeath - whether or not this ability should be persistent on death
    • isRegenerationBlocksSavingProcessRunning

      boolean isRegenerationBlocksSavingProcessRunning()
      The saving process of the blocks inside the arenas (aka regeneration blocks) is being executed async. This method returns if it's currently running or not.
      Returns:
      Whether the arenas inside the block are currently being fetched and saved.
      See Also:
    • runRegenerationBlocksSavingProcess

      void runRegenerationBlocksSavingProcess(@Nullable @Nullable Consumer<Boolean> finishCallback)
      The saving process of the blocks inside the arenas (aka regeneration blocks) is being executed async. This method runs the process.

      Keep in mind that the arena has to be stopped (ArenaStatus.STOPPED and the process may not be running already isRegenerationBlocksSavingProcessRunning(). The optional callback will immediatly return false in those cases.

      Parameters:
      finishCallback - Gets called (possibly in a second thread) when the process is done. The parameter inside the callback tells you if the process was sucessfull or not.
      See Also:
    • runRegenerationBlocksSavingProcess

      default void runRegenerationBlocksSavingProcess()
      The saving process of the blocks inside the arenas (aka regeneration blocks) is being executed async. This method runs the process.

      Keep in mind that the arena has to be stopped (ArenaStatus.STOPPED and the process may not be running already isRegenerationBlocksSavingProcessRunning(). You might want to use runRegenerationBlocksSavingProcess(Consumer) if you want to know when it is done.

      See Also:
    • getDefaultIssues

      Set<ArenaIssuesCheckEvent.Issue> getDefaultIssues(@Nullable @Nullable CommandSender sender)
      Returns all the issues that were detected by this plugin (and not manually added by others) that prevent the arena from running.

      You most likely want to use getIssues(CommandSender) instead as other plugins are able to add their own issues as well using the ArenaIssuesCheckEvent. This method does not count those in.

      Parameters:
      sender - Will translate the message into the language of the sender. Passing null causes it to be in the default configured language
      Returns:
      All the issues that prevent it from running. If there are none then there's nothing preventing it.
      See Also:
    • getDefaultIssues

      default Set<ArenaIssuesCheckEvent.Issue> getDefaultIssues()
      Returns all the issues that were detected by this plugin (and not manually added by others) that prevent the arena from running.

      You most likely want to use getIssues() instead as other plugins are able to add their own issues as well using the ArenaIssuesCheckEvent. This method does not count those in.

      Returns:
      All the issues that prevent it from running. If there are none then there's nothing preventing it.
      See Also:
    • getIssues

      Set<ArenaIssuesCheckEvent.Issue> getIssues(@Nullable @Nullable CommandSender sender)
      Returns all the issues that prevent the arena from running.

      It'll use ArenaIssuesCheckEvent as well to check wether other plugins added additional issues.

      The plugin uses the same method when it loads all the arenas during start up or when manually trying to start an arena.
      Parameters:
      sender - Will translate the message into the language of the sender. Passing null causes it to be in the default configured language
      Returns:
      All the issues that prevent it from running. If there are none then there's nothing preventing it.
      See Also:
    • getIssues

      Returns all the issues that prevent the arena from running.

      It'll use ArenaIssuesCheckEvent as well to check wether other plugins added additional issues.

      The plugin uses the same method when it loads all the arenas during start up or when manually trying to start an arena.

      Returns:
      All the issues that prevent it from running. If there are none then there's nothing preventing it.
      See Also:
    • getBuyGroupLevel

      int getBuyGroupLevel(Player player, BuyGroup group)
      Returns the current buy-group level of the player.

      Returns BuyGroup.getLowestLevel() as the initial value for players, even in cases when the given player is not playing in the arena.

      Parameters:
      player - The player whose level in the buy-group we want to find
      group - The corresponding buy-group
      Returns:
      The players current level in the buy-group
      See Also:
    • setBuyGroupLevel

      void setBuyGroupLevel(Player player, BuyGroup group, int level)
      Modify the buy-group level of the player.

      It doesn't have any effect when the given player is not playing inside the arena and the arena currently isn't running ArenaStatus.RUNNING.

      Parameters:
      player - The player whose level we want to change
      group - The corresponding buy-group
      level - The new level
      See Also:
    • getSpectatorSpawn

      @Nullable @Nullable XYZYP getSpectatorSpawn()
      Returns the spawnpoint of a spectator.

      It's possible that the method returns null as it's not required to have it set for a running arena. The plugin decides for a random points inside the arena if none is set.

      Returns:
      The spawnpoint for spectators, possibly null
    • setSpectatorSpawn

      void setSpectatorSpawn(@Nullable @Nullable XYZYP location)
      Set the spawnpoint for spectators.

      It's okay for the value to be null as it's not required to have it set for a running arena. The plugin decides for a random points inside the arena if none is set.

      Parameters:
      location - The new spawnpoint for spectators, possibly null
    • getTeamPrivateInventory

      @Nullable @Nullable Inventory getTeamPrivateInventory(Team team)
      Obtain a teams private inventory using this method.

      Each team has a private inventory during a match that can be accessed for instance by an ender chest (depending on the configuration). This method returns the exact inventory instance that will be opened when a player would interact with it.

      Parameters:
      team - The team that owns the inventory
      Returns:
      The private inventory of the team. null when the match is not running or when the team is not enabled
    • getPlayerPrivateInventory

      @Nullable @Nullable Inventory getPlayerPrivateInventory(Player player)
      Obtain a players private chest inventory using this method.

      Each player has an a private inventory that they can access during a match using an Ender Chest. Note that that users can set Team Chests to be the Ender Chest block. In this case, this private chest inventory not be accessible to the player though an Ender Chest. See getTeamPrivateInventory(Team) for team chest inventories.

      Parameters:
      player - the Player whose ender chest inventory we want to get
      Returns:
      The private inventory of the player. null when the match is not running or when the player is not in a running arena
    • endMatch

      boolean endMatch(@Nullable @Nullable Team winningTeam)
      Forcefully stop the match right now.

      This only works when the current state is ArenaStatus.RUNNING. The method will return false if it failed to end it.

      Parameters:
      winningTeam - The team that has won the match. Use null to mark it as a draw
      Returns:
      If it was successful or not
    • exists

      boolean exists()
      Returns whether this arena is still existing.
      Returns:
      true if it still exists
    • applyPlayerClimate

      void applyPlayerClimate(Player player)
      Applies the configured weather and time properties to the player.

      Uses Player.setPlayerTime(long, boolean) and Player.setPlayerWeather(WeatherType). What exactly will happen greatly varies on the configurations on the user (e.g. whether "no-rain" is enabled). This method is useful when you've been modifying the players climate manually and would like to change it back to the normal state.

      This method doesn't care whether the player is currently inside the arena or not.

      Parameters:
      player - The target player
    • isCloned

      boolean isCloned()
      Returns whether this arena has been cloned from an other arena.

      Cloned arenas aren't getting saved.
      In case this method returns true, you may also expect a non-null value from getCloneParent().

      Returns:
      true in case this arena has been cloned from an other arena
      See Also:
    • getCloneParent

      @Nullable @Nullable Arena getCloneParent()
      Gets the arena from which this arena has been cloned from.

      Returns null when this arena hasn't been cloned.

      Returns:
      The arena from which this arena has been cloned from. May be null
      See Also:
    • getClones

      Arena[] getClones()
      Gets all arenas that were cloned using this arena (basically the child arenas).
      Returns:
      All arenas that have been cloned from this arena
      See Also:
    • saveAsync

      void saveAsync()
      Save the arenas current state. Does not include the blocks file.

      The process is being executed on a separate thread.

      MBedwars is also handling file lockages and queues properly. This means that the saving process may not be executed immediately if there are prior tasks.

    • saveNow

      void saveNow()
      Save the arenas current state. Does not include the blocks file.

      Note that the saving process is being executed on the same thread as yours.

      MBedwars is also handling file lockages and queues properly. This means that the saving process may not be executed immediately if there are prior tasks.

    • setResetPlayerTimeOnQuit

      void setResetPlayerTimeOnQuit(boolean newValue)
      Define whether the player's time should be reset to default after one leaves.

      It is being reset back to default after a new match is being started.
      Whether it is true or default by default depends on whether always-day is enabled.

      Player.resetPlayerTime() is being used.

      Parameters:
      newValue - The new value
    • setResetPlayerWeatherOnQuit

      void setResetPlayerWeatherOnQuit(boolean newValue)
      Define whether the player's weather should be reset to default after one leaves.

      It is being reset back to default after a new match is being started.
      Whether it is true or default by default depends on whether no-rain is enabled.

      Player.resetPlayerWeather() is being used.

      Parameters:
      newValue - The new value
    • isResetPlayerTimeOnQuit

      boolean isResetPlayerTimeOnQuit()
      Gets whether the player's time shall be reset to default after one leaves.

      It is being reset back to default after a new match is being started.
      Whether it is true or default by default depends on whether always-day is enabled.

      Player.resetPlayerTime() is being used.

      Returns:
      The current value
    • isResetPlayerWeatherOnQuit

      boolean isResetPlayerWeatherOnQuit()
      Gets whether the player's weather shall be reset to default after one leaves.

      It is being reset back to default after a new match is being started.
      Whether it is true or default by default depends on whether no-rain is enabled.

      Player.resetPlayerWeather() is being used.

      Returns:
      The current value
    • getTeamByBaseLocation

      @Nullable @Nullable Team getTeamByBaseLocation(Location loc)
      Tries to fetch the team of a location that's inside a base.

      This method will return null if there's no team at the given position (if it's outside of all bases)

      Parameters:
      loc - The location with which we shall check
      Returns:
      The team's base that's at the given location. null if there's none
      See Also:
    • getTeamByBaseLocation

      @Nullable @Nullable Team getTeamByBaseLocation(XYZ xyz)
      Tries to fetch the team of a location that's inside a base.

      This method will return null if there's no team at the given position (if it's outside of all bases)

      Parameters:
      xyz - The location with which we shall check
      Returns:
      The team's base that's at the given location. null if there's none
      See Also:
    • getPersistentStorage

      ArenaPersistentStorage getPersistentStorage()
      Gets a helper class for storing persistent information for exactly this arena instance.

      It may also be used to synchronize between servers.

      Specified by:
      getPersistentStorage in interface PersistentStorage.Holder
      Returns:
      The persistant storage of this arena
    • getNative

      <T> T getNative()
      Returns the Arena instance that's being used internally.

      There's no real use for third-party developers.

      Type Parameters:
      T - Automatically casts the instance to the given generic
      Returns:
      The native arena instance
    • broadcastCustomPropertyChange

      void broadcastCustomPropertyChange()
      Broadcast that a custom property has been changed (e.g. the value of an arena picker).

      This may be useful if you e.g. want to forcefully redraw all Arena GUIs (across all servers), as a custom arena picker variable has changed, whereby the arena isn't supposed to be visible anymore.

      This method also calls the ArenaPropertyChangeEvent and the RemoteArenaPropertiesChangeEvent.

    • getVoting

      @Nullable @Nullable ArenaVotingHandler getVoting()
      Returns the voting handler of this arena.

      Check whether it's a voting arena using getRegenerationType().

      Returns:
      The voting handler of this arena. null if it's not a voting arena
    • getParticipatingVotingPool

      @Nullable @Nullable Arena getParticipatingVotingPool()
      Returns the voting arena in which this arena is in the pool of.
      Returns:
      The voting arena in which this arena is in the pool of. null if it's not in any
    • isPrizeForMatchEnabled

      boolean isPrizeForMatchEnabled()
      Get whether prizes (rewards in form of e.g. coins) will be given to players during this match.

      This method resets itself back to true after the match has ended.

      Returns:
      Whether prizes will be given to players during this match
      See Also:
    • addPrizeForMatchDisabledTicket

      void addPrizeForMatchDisabledTicket(String ticketId)
      Set whether prizes (rewards in form of e.g. coins, achievements, stats ...) will be given to players during this match.

      This method resets itself back to true after the match has ended.

      The ticket id may be whatever you choose. It only has to be unique to keep the support for other plugins.

      Parameters:
      ticketId - The ticket id of whatever reason the prize for match has been disabled
      See Also:
    • removePrizeForMatchDisabledTicket

      boolean removePrizeForMatchDisabledTicket(String ticketId)
      Remove a ticket id from the list of reasons to disable prizes (rewards in form of e.g. coins, achievements, stats ...).
      Parameters:
      ticketId - The ticket id of whatever reason the prize for match has been disabled
      Returns:
      true if the ticket id has been removed
      See Also:
    • getPrizeForMatchDisabledTickets

      Set<String> getPrizeForMatchDisabledTickets()
      Get a list of ticket ids of whatever reason the prize for match has been disabled.
      Returns:
      A list of ticket ids of whatever reason the prize for match has been disabled
      See Also:
    • asRemote

      RemoteArena asRemote()
      Returns the RemoteArena variant of this arena.
      Returns:
      A (local) remote arena that represents this arena
      See Also: