Package com.andrei1058.bedwars.api
Interface BedWars.ArenaUtil
- Enclosing interface:
- BedWars
public static interface BedWars.ArenaUtil
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a custom arena to the enable queue.booleancanAutoScale(String arenaName) Check if an arena can be auto-scaled.getArenaByIdentifier(String worldName) getArenaByName(String worldName) Get an arena by world namegetArenaByPlayer(org.bukkit.entity.Player player) Get an arena by a player.Arena enable queue.intGet how many games till the next restart.intgetPlayers(String group) Get players count for a groupbooleanisPlaying(org.bukkit.entity.Player p) Check if a player is playing.booleanisSpectating(org.bukkit.entity.Player p) Check if a player is spectating.booleanjoinRandomArena(org.bukkit.entity.Player p) Add a player to the most filled arena.booleanjoinRandomFromGroup(org.bukkit.entity.Player p, String group) Add a player to the most filled arena from a group.voidLoad an arena.voidremoveArenaByName(String worldName) RemovevoidremoveArenaByPlayer(org.bukkit.entity.Player p, IArena a) RemovevoidRemove an arena from the enable queue.voidsendLobbyCommandItems(org.bukkit.entity.Player p) This will give the lobby items to the player.voidsetArenaByName(IArena arena) voidsetArenaByPlayer(org.bukkit.entity.Player p, IArena arena) Set an arena by player if the player is in this arena.voidsetGamesBeforeRestart(int games) Set how many games to the next serve restart.booleanvipJoin(org.bukkit.entity.Player p) Check if a player has vip join.
- 
Method Details- 
canAutoScaleCheck if an arena can be auto-scaled.- Returns:
- always true if auto-scale is disabled.
 
- 
addToEnableQueueAdd a custom arena to the enable queue.
- 
removeFromEnableQueueRemove an arena from the enable queue.
- 
isPlayingboolean isPlaying(org.bukkit.entity.Player p) Check if a player is playing.
- 
isSpectatingboolean isSpectating(org.bukkit.entity.Player p) Check if a player is spectating.
- 
loadArenaLoad an arena. Add it to the enable queue.- Parameters:
- sender- If you want to send feedback. Use null otherwise.
 
- 
setGamesBeforeRestartvoid setGamesBeforeRestart(int games) Set how many games to the next serve restart. This is used only ifServerType.BUNGEE
- 
getGamesBeforeRestartint getGamesBeforeRestart()Get how many games till the next restart. This is used only ifServerType.BUNGEE
- 
getArenaByPlayerGet an arena by a player. Spectator or Player.- Parameters:
- player- Target player
- Returns:
- The arena where the player is in. Can be NULL.
 
- 
setArenaByPlayerSet an arena by player if the player is in this arena.
- 
removeArenaByPlayerRemove
- 
getArenaByNameGet an arena by world name- Parameters:
- worldName- World name
 
- 
getArenaByIdentifier
- 
setArenaByName
- 
removeArenaByNameRemove
- 
getArenasLinkedList<IArena> getArenas()
- 
vipJoinboolean vipJoin(org.bukkit.entity.Player p) Check if a player has vip join.
- 
getPlayersGet players count for a group
- 
joinRandomArenaboolean joinRandomArena(org.bukkit.entity.Player p) Add a player to the most filled arena. Check if is the party owner first.- Returns:
- true if joined.
 
- 
joinRandomFromGroupAdd a player to the most filled arena from a group.- Returns:
- true if added.
 
- 
getEnableQueueLinkedList<IArena> getEnableQueue()Arena enable queue.
- 
sendLobbyCommandItemsvoid sendLobbyCommandItems(org.bukkit.entity.Player p) This will give the lobby items to the player. Not used in serverType BUNGEE. This will clear the inventory first.
 
-