Interface MenuContent
public interface MenuContent
The MenuContent interface represents a piece of content in a menu.
It defines methods for retrieving the display item, handling click events,
and getting the name of the menu content.
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStack
getDisplayItem
(org.bukkit.entity.Player player, ITeam team) Retrieves the display item for this menu content.getName()
Retrieves the name of this menu content.boolean
onClick
(org.bukkit.entity.Player player, org.bukkit.event.inventory.ClickType clickType, ITeam team, boolean forFree, boolean announcePurchase, boolean announceAlreadyUnlocked, boolean openInv) Handles the click event for a specific upgrade item.
-
Method Details
-
getDisplayItem
Retrieves the display item for this menu content.- Parameters:
player
- the player viewing the menuteam
- the team associated with the menu- Returns:
- the display item
-
onClick
boolean onClick(org.bukkit.entity.Player player, org.bukkit.event.inventory.ClickType clickType, ITeam team, boolean forFree, boolean announcePurchase, boolean announceAlreadyUnlocked, boolean openInv) Handles the click event for a specific upgrade item.- Parameters:
player
- The player who initiated the upgrade.clickType
- The type of click.team
- The team associated with the menu.forFree
- Indicates if the upgrade is obtained for free.announcePurchase
- Indicates whether the purchase should be announced to the team.openInv
- Indicates whether to open the inventory menu after purchase.- Returns:
- True if the upgrade was successfully applied, false otherwise.
-
getName
String getName()Retrieves the name of this menu content.- Returns:
- the name of the menu content
-