Class SpigotMinecraftGUIFactory

java.lang.Object
me.bristermitten.mittenlib.gui.factory.SpigotMinecraftGUIFactory
All Implemented Interfaces:
MinecraftGUIFactory

public class SpigotMinecraftGUIFactory extends Object implements MinecraftGUIFactory
Spigot implementation of GUIFactory for creating GUI components. Replaces static factory methods with dependency-injected instances.
  • Constructor Details

  • Method Details

    • createSpigotView

      public <Command> SpigotGUIView<Command> createSpigotView(int size, String title)
      Description copied from interface: MinecraftGUIFactory
      Creates a new SpigotGUIView with the specified size and title.
      Specified by:
      createSpigotView in interface MinecraftGUIFactory
      Type Parameters:
      Command - the command type
      Parameters:
      size - the inventory size (must be a multiple of 9)
      title - the inventory title
      Returns:
      a new SpigotGUIView instance
    • createButton

      public <Command> InventoryButton<Command> createButton(ItemStack itemStack, Command command)
      Description copied from interface: MinecraftGUIFactory
      Creates a new InventoryButton with the specified item and command.
      Specified by:
      createButton in interface MinecraftGUIFactory
      Type Parameters:
      Command - the command type
      Parameters:
      itemStack - the item stack to display
      command - the command to execute when clicked
      Returns:
      a new InventoryButton instance
    • createButton

      public <Command> InventoryButton<Command> createButton(ItemStack itemStack, Command command, String displayName)
      Description copied from interface: MinecraftGUIFactory
      Creates a new InventoryButton with the specified item, command, and display name.
      Specified by:
      createButton in interface MinecraftGUIFactory
      Type Parameters:
      Command - the command type
      Parameters:
      itemStack - the base item stack
      command - the command to execute when clicked
      displayName - the display name for the item
      Returns:
      a new InventoryButton instance with custom display name