Package com.tomkeuper.bedwars.api
Interface BedWars
public interface BedWars
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Utility interface for managing AFK (Away From Keyboard) status of players in the bed wars mini-game.static interface
The ArenaUtil interface provides utility methods for managing arenas in the bed wars mini-game.static interface
static interface
static interface
Utility interface for managing lobby items.static interface
The utility interface for managing scoreboards in BedWars.static interface
The ShopUtil interface provides utility methods for managing player's money, currency, and purchases in the shop.static interface
An implementation of the TeamUpgradesUtil interface that provides access to team upgrade-related functionalities. -
Method Summary
Modifier and TypeMethodDescriptionGet the path to the addons folder in the BedWars plugin.Get addon utilGet afk system methods.Retrieves the ArenaUtil interface for managing arenas in the bed wars mini-game.Get the main BedWars command.Get the chat utility class used by BedWars.Get the default language used by the BedWars plugin.Get the economy utility class used by BedWars.getForCurrentVersion
(String v18, String v12, String v13) Get the appropriate version string based on the server's current version.Get holograms util.Retrieves the ItemUtil interface for in game lobby itemsgetLangIso
(org.bukkit.entity.Player p) Get the language ISO code for a player.getLanguageByIso
(String isoCode) Get the language by its ISO code.Get the utility class for managing levels in BedWars.Get the name of the lobby world in BedWars.Get the utility class for managing parties in BedWars.getPlayerLanguage
(org.bukkit.entity.Player player) Get the language used by a player.Get the redis communication client.Get the remote database implementation used by BedWars.Get the restore adapter used by the BedWars plugin.Get the scoreboard manager used by the BedWars plugin.Get the utility class for managing scoreboards in BedWars.Get the server type of the BedWars plugin.getSetupSession
(UUID player) Get the active setup session for a player.Get shop util.Get stats utils.Get the Support PlaceholderAPI utility for BedWars.Get shop util.Get the version support utility for BedWars.boolean
Check if auto-scaling is enabled in BedWars.boolean
isInSetupSession
(UUID player) Check if a player is currently in a setup session.boolean
Check if the BedWars plugin is currently shutting down.void
setEconomyAdapter
(IEconomy economyAdapter) Set the economy adapter used by BedWars.void
setLevelAdapter
(Level level) Set the level adapter used by the BedWars plugin.void
setPartyAdapter
(Party partyAdapter) Set a custom party adapter for the BedWars plugin.void
setRemoteDatabase
(IDatabase database) Set the remote database implementation for BedWars.void
setRestoreAdapter
(RestoreAdapter restoreAdapter) Set a custom restore adapter for the BedWars plugin.
-
Method Details
-
getStatsUtil
BedWars.IStats getStatsUtil()Get stats utils. -
getAddonsUtil
IAddonManager getAddonsUtil()Get addon util -
getHologramsUtil
IHologramManager getHologramsUtil()Get holograms util. -
getAFKUtil
BedWars.AFKUtil getAFKUtil()Get afk system methods. It will only work if the game is started. -
getArenaUtil
BedWars.ArenaUtil getArenaUtil()Retrieves the ArenaUtil interface for managing arenas in the bed wars mini-game.- Returns:
- the ArenaUtil interface
-
getConfigs
BedWars.Configs getConfigs() -
getShopUtil
BedWars.ShopUtil getShopUtil()Get shop util. -
getTeamUpgradesUtil
BedWars.TeamUpgradesUtil getTeamUpgradesUtil()Get shop util. -
getLevelsUtil
Level getLevelsUtil()Get the utility class for managing levels in BedWars.- Returns:
- the
Level
utility class
-
getPartyUtil
Party getPartyUtil()Get the utility class for managing parties in BedWars.- Returns:
- the
Party
utility class
-
getSetupSession
Get the active setup session for a player.- Parameters:
player
- the UUID of the player- Returns:
- the active setup session for the player, or null if no session was found
-
isInSetupSession
Check if a player is currently in a setup session.- Parameters:
player
- the UUID of the player- Returns:
- true if the player is in a setup session, false otherwise
-
getServerType
ServerType getServerType()Get the server type of the BedWars plugin.- Returns:
- the server type
-
getLangIso
Get the language ISO code for a player.- Parameters:
p
- the player- Returns:
- the language ISO code of the player
-
getBedWarsCommand
ParentCommand getBedWarsCommand()Get the main BedWars command.- Returns:
- the main command for BedWars
-
getRestoreAdapter
RestoreAdapter getRestoreAdapter()Get the restore adapter used by the BedWars plugin.- Returns:
- the restore adapter
-
setRestoreAdapter
Set a custom restore adapter for the BedWars plugin.- Parameters:
restoreAdapter
- the custom restore adapter to set- Throws:
IllegalAccessError
- if arenas are not unloaded when changing the adapter
-
setPartyAdapter
Set a custom party adapter for the BedWars plugin.- Parameters:
partyAdapter
- the custom party adapter to set- Throws:
IllegalAccessError
- if the party adapter is null or already set to the default adapter
-
getVersionSupport
VersionSupport getVersionSupport()Get the version support utility for BedWars.- Returns:
- the version support utility
-
getSupportPapi
SupportPAPI getSupportPapi()Get the Support PlaceholderAPI utility for BedWars.- Returns:
- the SupportPAPI utility
-
getDefaultLang
Language getDefaultLang()Get the default language used by the BedWars plugin.- Returns:
- the default language
-
getLobbyWorld
String getLobbyWorld()Get the name of the lobby world in BedWars.- Returns:
- the name of the lobby world
-
getForCurrentVersion
Get the appropriate version string based on the server's current version.- Parameters:
v18
- the string for version 1.8 - 1.11v12
- the string for version 1.12v13
- the string for version 1.13 and newer- Returns:
- the appropriate version string based on the server's version
-
setLevelAdapter
Set the level adapter used by the BedWars plugin.- Parameters:
level
- the level adapter to set
-
isAutoScale
boolean isAutoScale()Check if auto-scaling is enabled in BedWars.- Returns:
- true if auto-scaling is enabled, false otherwise
-
getLanguageByIso
Get the language by its ISO code.- Parameters:
isoCode
- the ISO code of the language- Returns:
- the language corresponding to the ISO code
-
getPlayerLanguage
Get the language used by a player.- Parameters:
player
- the player- Returns:
- the language used by the player
-
getAddonsPath
File getAddonsPath()Get the path to the addons folder in the BedWars plugin.- Returns:
- the addons folder path
-
isShuttingDown
boolean isShuttingDown()Check if the BedWars plugin is currently shutting down.- Returns:
- true if the plugin is shutting down, false otherwise
-
getScoreboardUtil
BedWars.ScoreboardUtil getScoreboardUtil()Get the utility class for managing scoreboards in BedWars.- Returns:
- the
BedWars.ScoreboardUtil
utility class
-
getScoreboardManager
IScoreboardService getScoreboardManager()Get the scoreboard manager used by the BedWars plugin.- Returns:
- the scoreboard manager
-
getEconomyUtil
IEconomy getEconomyUtil()Get the economy utility class used by BedWars.- Returns:
- the
IEconomy
utility class
-
getChatUtil
IChat getChatUtil()Get the chat utility class used by BedWars.- Returns:
- the
IChat
utility class
-
setRemoteDatabase
Set the remote database implementation for BedWars.- Parameters:
database
- the remote database implementation to set
-
getRemoteDatabase
IDatabase getRemoteDatabase()Get the remote database implementation used by BedWars.- Returns:
- the remote database implementation
-
setEconomyAdapter
Set the economy adapter used by BedWars.- Parameters:
economyAdapter
- the economy adapter to set
-
getRedisClient
IRedisClient getRedisClient()Get the redis communication client.- Returns:
- the
IRedisClient
utility class
-
getItemUtil
BedWars.ItemUtil getItemUtil()Retrieves the ItemUtil interface for in game lobby items- Returns:
- the ItemUtil interface
-