Package dev.crafty.core.gui
Class GuiStackManager
java.lang.Object
dev.crafty.core.gui.GuiStackManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidhandleInventoryClose(org.bukkit.entity.Player player) Handles when a player closes an inventory without using the back button.static voidmarkSuppressClose(org.bukkit.entity.Player player) static voidnavigateBack(org.bukkit.entity.Player player) Navigates back to the previous menu in the stack.static voidregisterInStack(org.bukkit.entity.Player player, Menu menu) Registers a menu in the player's stack.
-
Constructor Details
-
GuiStackManager
public GuiStackManager()
-
-
Method Details
-
registerInStack
Registers a menu in the player's stack. This should be called when a menu is opened.- Parameters:
player- The player viewing the menumenu- The menu being opened
-
markSuppressClose
public static void markSuppressClose(org.bukkit.entity.Player player) -
handleInventoryClose
public static void handleInventoryClose(org.bukkit.entity.Player player) Handles when a player closes an inventory without using the back button. This removes the current menu from the stack.- Parameters:
player- The player who closed the inventory
-