Package valorless.havenbags.gui
Class UpgradeGUI
java.lang.Object
valorless.havenbags.gui.UpgradeGUI
- All Implemented Interfaces:
org.bukkit.event.Listener
UpgradeGUI is a GUI for upgrading bags or applying skins to them.
It allows players to upgrade their bags to larger sizes or apply skins using tokens.
The GUI is opened by right-clicking a specific block (defined in the config).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Static class to keep track of all open UpgradeGUIs.static enum
Enum to define the type of result for the upgrade GUI. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Closes the UpgradeGUI and returns the items to the player's inventory.org.bukkit.inventory.Inventory
GetInv()
void
onInventoryClick
(org.bukkit.event.inventory.InventoryClickEvent event) void
onInventoryClickResult
(org.bukkit.event.inventory.InventoryClickEvent event) void
onInventoryClose
(org.bukkit.event.inventory.InventoryCloseEvent event) void
onInventoryDrag
(org.bukkit.event.inventory.InventoryDragEvent event) void
onInventoryShiftClick
(org.bukkit.event.inventory.InventoryClickEvent event)
-
Constructor Details
-
UpgradeGUI
public UpgradeGUI(org.bukkit.entity.Player player)
-
-
Method Details
-
GetInv
public org.bukkit.inventory.Inventory GetInv() -
onInventoryDrag
public void onInventoryDrag(org.bukkit.event.inventory.InventoryDragEvent event) -
onInventoryClick
public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event) -
onInventoryShiftClick
public void onInventoryShiftClick(org.bukkit.event.inventory.InventoryClickEvent event) -
onInventoryClickResult
public void onInventoryClickResult(org.bukkit.event.inventory.InventoryClickEvent event) -
onInventoryClose
public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event) -
Close
Closes the UpgradeGUI and returns the items to the player's inventory.- Parameters:
items
- The items to return to the player.
-