Interface RemoteArena
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPlayer(AddRemotePlayerInfo info, @Nullable Consumer<RemotePlayerAddResult> callback) Adds a player (or multiple players) into the arena.default voidaddPlayer(RemotePlayer player) Adds a player into the arena.default voidaddPlayer(RemotePlayer player, @Nullable Team team) Adds a player into the arena.default voidaddPlayer(RemotePlayer player, @Nullable Team team, @Nullable Consumer<RemotePlayerAddResult> callback) Adds a player into the arena.default voidaddPlayer(RemotePlayer player, @Nullable Consumer<RemotePlayerAddResult> callback) Adds a player into the arena.default voidaddSpectator(RemotePlayer player) Adds a spectator into the arena.default voidaddSpectator(RemotePlayer player, boolean ignoreArenaStatus) Adds a spectator into the arena.default voidaddSpectator(RemotePlayer player, boolean ignoreArenaStatus, Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.default voidaddSpectator(RemotePlayer player, SpectateReason reason) Adds a spectator into the arena.default voidaddSpectator(RemotePlayer player, SpectateReason reason, boolean ignoreArenaStatus) Adds a spectator into the arena.voidaddSpectator(RemotePlayer player, SpectateReason reason, boolean ignoreArenaStatus, @Nullable Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.default voidaddSpectator(RemotePlayer player, SpectateReason reason, @Nullable Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.default voidaddSpectator(RemotePlayer player, @Nullable Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.booleanexists()Returns whether this arena is still existing.String[]Returns the authors of the arena.@Nullable RemoteArenaGets the arena from which this arena has been cloned from.Gets all arenas that were cloned using this arena (basically the child arenas).Returns all authors in a string split up by a comma.getDisplayedAuthors(@Nullable CommandSender sender) Returns all authors in a string split up by a comma.Returns the non-unique name of the arena for displaying to playersReturns every team that has been enabled for this arena.@Nullable StringReturns the name of the world in which the game is located at.getIcon()Gets the icon of the arena.default Set<ArenaIssuesCheckEvent.Issue> Gets the issues that prevent the arena from running-getIssues(@Nullable CommandSender sender) Gets the issues that prevent the arena from running-@Nullable ArenagetLocal()Gets the arena instance that is being represented by this arena.intCalculates [teams amount] x [players per team] when using a normal arena.intReturns the minimum amount of players that are needed to start match.getName()Returns the unique name of the arena.Gets a helper class for storing persistent information for exactly this arena instance.intReturns the amount of players that are currently playing on this arena.intReturns the amount of players that can be in a team.Returns whatArena.getName()would return on the server, in which the arena is located at.Returns the regeneration type aka the form/variant of the arena.Collection<? extends RemotePlayer> Returns all the players that are currently playing on this arena.Gets the server on which the arena is being managed on.intReturns the amount of players currently spectating the arena.Returns the current state of the arenabooleanisCloned()Returns whether this arena has been cloned from another arena.booleanisLocal()Gets whether the arena is located on our server, or if it's being managed by an other one.voidsyncProperties(RemoteArenaPropertiesChangeEvent.Property... properties) Forcefully request the server owing this arena to resend us up-to-date poperty information.default voidteleportHere(RemotePlayer player) Teleports a player into the arena.default voidteleportHere(RemotePlayer player, boolean sendMessage) Teleports a player into the arena.voidteleportHere(RemotePlayer player, boolean sendMessage, @Nullable Consumer<Boolean> callback) Teleports a player into the arena.default voidteleportHere(RemotePlayer player, @Nullable Consumer<Boolean> callback) Teleports a player into the arena.
- 
Method Details- 
getNameString getName()Returns the unique name of the arena.This name might has been changed in order to retain compatibility with the other existing arenas. For instance, it might have a @ prefix to indiciate that it's non-local arena. It might also contain a # suffix with a number, in case there are multiple arenas with the same name. Because of that, the name likely differs on other servers. Use getRealName()if you'd like to get the actual name with out the suffixes and prefixes.
 UsegetDisplayName()if you'd like to the name that shall be displayed to players.- Returns:
- Returns the name of the arena
 
- 
getRealNameString getRealName()Returns whatArena.getName()would return on the server, in which the arena is located at.Basically, it returns getName()without the prefixes and suffixes. If the arena is local, then it's equal togetName().- Returns:
- The actual name without any suffix
 
- 
getDisplayNameString getDisplayName()Returns the non-unique name of the arena for displaying to playersUses the custom name if one is configured, otherwise uses getName()- Returns:
- The name of the arena used in displays
 
- 
isLocalboolean isLocal()Gets whether the arena is located on our server, or if it's being managed by an other one.- Returns:
- true: it's being managed by this server
 
- 
getLocalGets the arena instance that is being represented by this arena.Returns nullin case it is not local. UseisLocal()to check that.- Returns:
- The local arena. May be null
 
- 
getRemoteServerRemoteServer getRemoteServer()Gets the server on which the arena is being managed on.Will return the same as RemoteAPI.getLocalServer()in caseisLocal()returns true.- Returns:
- The server on which the arena is located on
 
- 
getStatusArenaStatus getStatus()Returns the current state of the arena- Returns:
- The current state of the arena
 
- 
getRegenerationTypeRegenerationType getRegenerationType()Returns the regeneration type aka the form/variant of the arena.- Returns:
- The regeneration type of the arena
 
- 
getRemotePlayersCollection<? extends RemotePlayer> getRemotePlayers()Returns all the players that are currently playing on this arena.This does not include spectators. - Returns:
- A collection of all playing players
 
- 
getPlayersCountint getPlayersCount()Returns the amount of players that are currently playing on this arena.This does not include spectators. - Returns:
- The amount of players that are playing on this arena
 
- 
getPlayersPerTeamint getPlayersPerTeam()Returns the amount of players that can be in a team.When the arena is RegenerationType.VOTINGthen it'll return the max amount of players in the arena- Returns:
- The configured amount of players that can be in a team
 
- 
getMinPlayersint 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
 
- 
getMaxPlayersint 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
 
- 
getEnabledTeamsReturns every team that has been enabled for this arena.- Returns:
- All added teams
 
- 
getAuthorsString[] getAuthors()Returns the authors of the arena.- Returns:
- The authors or creators of the arena
 
- 
getDisplayedAuthorsReturns 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
 
- 
getDisplayedAuthorsString 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
 
- 
getIconItemStack getIcon()Gets the icon of the arena.- Returns:
- The icon that's being used in GUIs
 
- 
getSpectatorsCountint getSpectatorsCount()Returns the amount of players currently spectating the arena.- Returns:
- The amount of spectators
 
- 
getIssuesGets the issues that prevent the arena from running-- Parameters:
- sender- Will translate the message into the language of the sender. Passing- nullcauses 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.
 
- 
getIssuesGets the issues that prevent the arena from running-- Returns:
- All the issues that prevent it from running. If there are none then there's nothing preventing it.
 
- 
getGameWorldNameReturns the name of the world in which the game is located at.- Returns:
- The configured world name in which the arena is located at
 
- 
isClonedboolean isCloned()Returns whether this arena has been cloned from another arena.- Returns:
- truein case this arena has been cloned from another arena
- See Also:
 
- 
getCloneParentGets the arena from which this arena has been cloned from.Returns nullwhen this arena hasn't been cloned. Do note that this method might returnnull, even ifisCloned()returnstrue. This is unlikely in 99% of the cases, but might occur due to latency in transmission.- Returns:
- The arena from which this arena has been cloned from. May be null
- See Also:
 
- 
getClonesRemoteArena[] 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:
 
- 
addPlayervoid addPlayer(AddRemotePlayerInfo info, @Nullable @Nullable Consumer<RemotePlayerAddResult> callback) Adds a player (or multiple players) into the arena.- Parameters:
- info- The object containing all the info required
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addPlayerdefault void addPlayer(RemotePlayer player, @Nullable @Nullable Team team, @Nullable @Nullable Consumer<RemotePlayerAddResult> callback) Adds a player into the arena.- Parameters:
- player- The player that shall get added into the arena
- team- The team it shall automatically join when entering it. May be- null
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addPlayerdefault void addPlayer(RemotePlayer player, @Nullable @Nullable Consumer<RemotePlayerAddResult> callback) Adds a player into the arena.- Parameters:
- player- The player that shall get added into the arena
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addPlayerAdds a player into the arena.- Parameters:
- player- The player that shall get added into the arena
 
- 
addPlayerAdds a player into the arena.- Parameters:
- player- The player that shall get added into the arena
- team- The team it shall automatically join when entering it. May be- null
 
- 
addSpectatorvoid addSpectator(RemotePlayer player, SpectateReason reason, boolean ignoreArenaStatus, @Nullable @Nullable Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- reason- The cause that made him into a spectator
- ignoreArenaStatus-- true: will be able to be one, even if the arena is not running
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addSpectatordefault void addSpectator(RemotePlayer player, SpectateReason reason, @Nullable @Nullable Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- reason- The cause that made him into a spectator
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addSpectatordefault void addSpectator(RemotePlayer player, @Nullable @Nullable Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addSpectatordefault void addSpectator(RemotePlayer player, boolean ignoreArenaStatus, Consumer<RemoteSpectatorAddResult> callback) Adds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- ignoreArenaStatus-- true: will be able to be one, even if the arena is not running
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
addSpectatorAdds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- reason- The cause that made him into a spectator
- ignoreArenaStatus-- true: will be able to be one, even if the arena is not running
 
- 
addSpectatorAdds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- reason- The cause that made him into a spectator
 
- 
addSpectatorAdds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
 
- 
addSpectatorAdds a spectator into the arena.- Parameters:
- player- The player that shall be a spectator
- ignoreArenaStatus-- true: will be able to be one, even if the arena is not running
 
- 
teleportHerevoid teleportHere(RemotePlayer player, boolean sendMessage, @Nullable @Nullable Consumer<Boolean> callback) Teleports a player into the arena. He will not play in it!Basically the same as /bw arena teleport. - Parameters:
- player- The player that shall get moved
- sendMessage- Whether a message shall be sent to the player to notify about its success or failure
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
teleportHereTeleports a player into the arena. He will not play in it!Basically the same as /bw arena teleport. - Parameters:
- player- The player that shall get moved
- sendMessage- Whether a message shall be sent to the player to notify about its success or failure
 
- 
teleportHereTeleports a player into the arena. He will not play in it!Basically the same as /bw arena teleport. - Parameters:
- player- The player that shall get moved
 
- 
teleportHereTeleports a player into the arena. He will not play in it!Basically the same as /bw arena teleport. - Parameters:
- player- The player that shall get moved
- callback- Gets called to notify you whether it was successful or not. May be- null
 
- 
getPersistentStorageArenaPersistentStorage getPersistentStorage()Gets a helper class for storing persistent information for exactly this arena instance.It may also be used to synchronize between servers. - Returns:
- The persistant storage of this arena
 
- 
syncPropertiesForcefully request the server owing this arena to resend us up-to-date poperty information.Generally the plugin does this automatically, but you may want to do it manually in some cases. In case everything went successfull, then RemoteArenaPropertiesChangeEventwill be called.- Parameters:
- properties- The properties that shall be synchronized with our server
- Throws:
- IllegalArgumentException- In case the properties are empty
- IllegalArgumentException- If a given property isn't supported
 
- 
existsboolean exists()Returns whether this arena is still existing.- Returns:
- trueif it still exists
 
 
-