Interface UpgradesIndex
public interface UpgradesIndex
The UpgradesIndex interface represents an upgrade menu in the BedWars game.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addContent
(MenuContent content, int slot) Add content to the upgrade menu.int
Get the total number of tiers in the upgrades.com.google.common.collect.ImmutableMap
<Integer, MenuContent> Get an immutable map of the menu content by slot.getName()
Get the name of the upgrade menu.void
open
(org.bukkit.entity.Player player) Open the upgrade menu for a player.
-
Method Details
-
getName
String getName()Get the name of the upgrade menu.- Returns:
- The name of the menu.
-
open
void open(org.bukkit.entity.Player player) Open the upgrade menu for a player. Make sure to useBedWars.TeamUpgradesUtil.setWatchingGUI(Player)
.- Parameters:
player
- The player to open the menu for.
-
addContent
Add content to the upgrade menu.- Parameters:
content
- The content instance to add.slot
- The slot where to put the content in the menu.- Returns:
- `true` if the content was successfully added, `false` if the slot is already in use.
-
countTiers
int countTiers()Get the total number of tiers in the upgrades.- Returns:
- The total number of tiers.
-
getMenuContentBySlot
com.google.common.collect.ImmutableMap<Integer,MenuContent> getMenuContentBySlot()Get an immutable map of the menu content by slot.- Returns:
- An immutable map of the menu content by slot.
-