Class InventoryManager

java.lang.Object
io.github.lucfr1746.llibrary.inventory.InventoryManager

public class InventoryManager extends Object
Manages custom inventories in the plugin. Handles opening, closing, and interaction events for GUIs.
  • Constructor Details

    • InventoryManager

      public InventoryManager()
  • Method Details

    • openGUI

      public void openGUI(String menuID, org.bukkit.entity.Player player)
      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

      public void registerInventoryBuilder(InventoryBuilder inventoryBuilder)
      Registers a new InventoryBuilder instance.
      Parameters:
      inventoryBuilder - The InventoryBuilder instance to register.
    • unregisterInventoryBuilder

      public void unregisterInventoryBuilder(InventoryBuilder inventoryBuilder)
      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.