Class InventoryManager
java.lang.Object
io.github.lucfr1746.llibrary.inventory.InventoryManager
Manages custom inventories in the plugin.
Handles opening, closing, and interaction events for GUIs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
Disables the inventory manager and closes all active inventories.void
load()
Loads necessary configurations for the inventory system.void
Opens a custom GUI for a player by menu ID.void
registerInventoryBuilder
(InventoryBuilder inventoryBuilder) Registers a new InventoryBuilder instance.void
unregisterInventoryBuilder
(InventoryBuilder inventoryBuilder) Unregisters an InventoryBuilder, removing its commands and closing active inventories.
-
Constructor Details
-
InventoryManager
public InventoryManager()
-
-
Method Details
-
openGUI
Opens a custom GUI for a player by menu ID.- Parameters:
menuID
- The ID of the menu to open.player
- The player who will see the GUI.
-
load
public void load()Loads necessary configurations for the inventory system. This method initializes the base menus by loading configurations from stored menu files. -
registerInventoryBuilder
Registers a new InventoryBuilder instance.- Parameters:
inventoryBuilder
- The InventoryBuilder instance to register.
-
unregisterInventoryBuilder
Unregisters an InventoryBuilder, removing its commands and closing active inventories.- Parameters:
inventoryBuilder
- The InventoryBuilder to unregister.
-
disable
public void disable()Disables the inventory manager and closes all active inventories.
-