Package com.andrei1058.bedwars.api
Interface BedWars.ArenaUtil
- Enclosing interface:
BedWars
public static interface BedWars.ArenaUtil
-
Method Summary
Modifier 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
-
canAutoScale
Check if an arena can be auto-scaled.- Returns:
- always true if auto-scale is disabled.
-
addToEnableQueue
Add a custom arena to the enable queue. -
removeFromEnableQueue
Remove an arena from the enable queue. -
isPlaying
boolean isPlaying(org.bukkit.entity.Player p) Check if a player is playing. -
isSpectating
boolean isSpectating(org.bukkit.entity.Player p) Check if a player is spectating. -
loadArena
Load an arena. Add it to the enable queue.- Parameters:
sender- If you want to send feedback. Use null otherwise.
-
setGamesBeforeRestart
void setGamesBeforeRestart(int games) Set how many games to the next serve restart. This is used only ifServerType.BUNGEE -
getGamesBeforeRestart
int getGamesBeforeRestart()Get how many games till the next restart. This is used only ifServerType.BUNGEE -
getArenaByPlayer
Get an arena by a player. Spectator or Player.- Parameters:
player- Target player- Returns:
- The arena where the player is in. Can be NULL.
-
setArenaByPlayer
Set an arena by player if the player is in this arena. -
removeArenaByPlayer
Remove -
getArenaByName
Get an arena by world name- Parameters:
worldName- World name
-
getArenaByIdentifier
-
setArenaByName
-
removeArenaByName
Remove -
getArenas
LinkedList<IArena> getArenas() -
vipJoin
boolean vipJoin(org.bukkit.entity.Player p) Check if a player has vip join. -
getPlayers
Get players count for a group -
joinRandomArena
boolean 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.
-
joinRandomFromGroup
Add a player to the most filled arena from a group.- Returns:
- true if added.
-
getEnableQueue
LinkedList<IArena> getEnableQueue()Arena enable queue. -
sendLobbyCommandItems
void 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.
-