Package org.screamingsandals.bedwars.api
Interface BedwarsAPI
public interface BedwarsAPI
-
Method Summary
Modifier and TypeMethodDescriptiongetGameByName
(String name) getGameOfEntity
(org.bukkit.entity.Entity entity) getGameOfPlayer
(org.bukkit.entity.Player player) getGames()
static BedwarsAPI
boolean
isEntityInGame
(org.bukkit.entity.Entity entity) boolean
isGameWithNameExists
(String name) boolean
boolean
isPlayerPlayingAnyGame
(org.bukkit.entity.Player player) void
registerEntityToGame
(org.bukkit.entity.Entity entity, Game game) void
unregisterEntityFromGame
(org.bukkit.entity.Entity entity)
-
Method Details
-
getGames
- Returns:
- List of available games
-
isGameWithNameExists
- Parameters:
name
- Name of game- Returns:
- true if game is exists
-
getGameByName
- Parameters:
name
- Name of game- Returns:
- Game or null if game is not exists
-
getGameOfPlayer
- Parameters:
player
- Player- Returns:
- Player's Game or null if player isn't in game
-
getGameWithHighestPlayers
Game getGameWithHighestPlayers()- Returns:
- Free game that has highest players in it
-
getGameWithLowestPlayers
Game getGameWithLowestPlayers()- Returns:
- Free game that has lowest players in it
-
isPlayerPlayingAnyGame
boolean isPlayerPlayingAnyGame(org.bukkit.entity.Player player) - Parameters:
player
- Player- Returns:
- true if player is in any game
-
getItemSpawnerTypes
List<ItemSpawnerType> getItemSpawnerTypes()- Returns:
- List of existing spawner types
-
isItemSpawnerTypeRegistered
- Parameters:
name
- Name of item spawner type- Returns:
- boolean Is spawner type registered
-
getItemSpawnerTypeByName
- Parameters:
name
- Name of item spawner type- Returns:
- ItemSpawnerType by name or null if type isn't exists
-
isEntityInGame
boolean isEntityInGame(org.bukkit.entity.Entity entity) - Parameters:
entity
- Entity- Returns:
- true if entity is in game
-
getGameOfEntity
- Parameters:
entity
- Entity- Returns:
- Game of entity or null
-
getFirstWaitingGame
Game getFirstWaitingGame()- Returns:
- Game in waiting state or null
-
getFirstRunningGame
Game getFirstRunningGame()- Returns:
- Game in running state or null
-
registerEntityToGame
- Parameters:
entity
- Entitygame
- Game
-
unregisterEntityFromGame
void unregisterEntityFromGame(org.bukkit.entity.Entity entity) - Parameters:
entity
- Entity
-
getPluginVersion
String getPluginVersion()- Returns:
- String of Bedwars Version
-
getColorChanger
ColorChanger getColorChanger()- Returns:
- Color changer for coloring ItemStacks
-
getHubServerName
String getHubServerName()- Returns:
- hub server name from config
-
getStatisticsManager
PlayerStatisticsManager getStatisticsManager()- Returns:
- PlayerStatisticsManager if statistics are enabled; otherwise null
-
getInstance
- Returns:
- Bedwars instance
-