Package com.andrei1058.bedwars.api
Interface BedWars.ArenaUtil
- Enclosing interface:
BedWars
public static interface BedWars.ArenaUtil
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a custom arena to the enable queue.boolean
canAutoScale
(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.int
Get how many games till the next restart.int
getPlayers
(String group) Get players count for a groupboolean
isPlaying
(org.bukkit.entity.Player p) Check if a player is playing.boolean
isSpectating
(org.bukkit.entity.Player p) Check if a player is spectating.boolean
joinRandomArena
(org.bukkit.entity.Player p) Add a player to the most filled arena.boolean
joinRandomFromGroup
(org.bukkit.entity.Player p, String group) Add a player to the most filled arena from a group.void
Load an arena.void
removeArenaByName
(String worldName) Removevoid
removeArenaByPlayer
(org.bukkit.entity.Player p, IArena a) Removevoid
Remove an arena from the enable queue.void
sendLobbyCommandItems
(org.bukkit.entity.Player p) This will give the lobby items to the player.void
setArenaByName
(IArena arena) void
setArenaByPlayer
(org.bukkit.entity.Player p, IArena arena) Set an arena by player if the player is in this arena.void
setGamesBeforeRestart
(int games) Set how many games to the next serve restart.boolean
vipJoin
(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.
-