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.int
getTotalUpgradeTiers
(IArena arena) Retrieves the total number of upgrade tiers available for an arena.boolean
isWatchingGUI
(org.bukkit.entity.Player player) Checks if a player is currently watching the team upgrades GUI.void
removeWatchingUpgrades
(UUID uuid) Removes the watching status for team upgrades from a player.void
setCustomMenuForArena
(IArena arena, UpgradesIndex menu) Sets a custom upgrade menu for an arena.void
setWatchingGUI
(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:
true
if the player is watching the team upgrades GUI,false
otherwise.
-
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:
UpgradesIndex
The upgrade menu for the specified arena.
-
getMenuContent
Check if is upgradable item. Used in inventory click.- Parameters:
item
- item to be checked.- Returns:
MenuContent
null if isn't an element.
-
getMenuContent
Get menu content by identifier.- Parameters:
identifier
- menu identifier to be checked.- Returns:
MenuContent
null if not found.
-
getMenuContentByName
HashMap<String,MenuContent> getMenuContentByName()Get a map of menu contents by their identifiers.- Returns:
- A
HashMap
containing menu identifiers as keys and correspondingMenuContent
objects as values.
-