Package com.tomkeuper.bedwars.api
Interface BedWars.TeamUpgradesUtil
- Enclosing interface:
BedWars
public static interface BedWars.TeamUpgradesUtil
An implementation of the TeamUpgradesUtil interface that provides access to team upgrade-related functionalities.
This implementation uses the UpgradesManager class to interact with team upgrades.
-
Method Summary
Modifier and TypeMethodDescriptiongetMenuContent(String identifier) Get menu content by identifier.getMenuContent(org.bukkit.inventory.ItemStack item) Check if is upgradable item.Get a map of menu contents by their identifiers.getMenuForArena(IArena arena) Retrieves the upgrade menu for an arena.intgetTotalUpgradeTiers(IArena arena) Retrieves the total number of upgrade tiers available for an arena.booleanisWatchingGUI(org.bukkit.entity.Player player) Checks if a player is currently watching the team upgrades GUI.voidremoveWatchingUpgrades(UUID uuid) Removes the watching status for team upgrades from a player.voidsetCustomMenuForArena(IArena arena, UpgradesIndex menu) Sets a custom upgrade menu for an arena.voidsetWatchingGUI(org.bukkit.entity.Player player) Sets a player to be watching the team upgrades GUI.
-
Method Details
-
isWatchingGUI
boolean isWatchingGUI(org.bukkit.entity.Player player) Checks if a player is currently watching the team upgrades GUI.- Parameters:
player- The player to check.- Returns:
trueif the player is watching the team upgrades GUI,falseotherwise.
-
setWatchingGUI
void setWatchingGUI(org.bukkit.entity.Player player) Sets a player to be watching the team upgrades GUI.- Parameters:
player- The player to set.
-
removeWatchingUpgrades
Removes the watching status for team upgrades from a player.- Parameters:
uuid- The UUID of the player.
-
getTotalUpgradeTiers
Retrieves the total number of upgrade tiers available for an arena.- Parameters:
arena- The arena to get the upgrade tiers for.- Returns:
- The total number of upgrade tiers for the specified arena.
-
setCustomMenuForArena
Sets a custom upgrade menu for an arena.- Parameters:
arena- The arena to set the custom menu for.menu- The custom upgrade menu.
-
getMenuForArena
Retrieves the upgrade menu for an arena.- Parameters:
arena- The arena to get the upgrade menu for.- Returns:
UpgradesIndexThe upgrade menu for the specified arena.
-
getMenuContent
Check if is upgradable item. Used in inventory click.- Parameters:
item- item to be checked.- Returns:
MenuContentnull if isn't an element.
-
getMenuContent
Get menu content by identifier.- Parameters:
identifier- menu identifier to be checked.- Returns:
MenuContentnull if not found.
-
getMenuContentByName
HashMap<String,MenuContent> getMenuContentByName()Get a map of menu contents by their identifiers.- Returns:
- A
HashMapcontaining menu identifiers as keys and correspondingMenuContentobjects as values.
-