Class SpigotMinecraftGUIFactory
java.lang.Object
me.bristermitten.mittenlib.gui.factory.SpigotMinecraftGUIFactory
- All Implemented Interfaces:
MinecraftGUIFactory
Spigot implementation of GUIFactory for creating GUI components.
Replaces static factory methods with dependency-injected instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<Command> InventoryButton<Command> createButton(ItemStack itemStack, Command command) Creates a new InventoryButton with the specified item and command.<Command> InventoryButton<Command> createButton(ItemStack itemStack, Command command, String displayName) Creates a new InventoryButton with the specified item, command, and display name.<Command> SpigotGUIView<Command> createSpigotView(int size, String title) Creates a new SpigotGUIView with the specified size and title.
-
Constructor Details
-
SpigotMinecraftGUIFactory
-
-
Method Details
-
createSpigotView
Description copied from interface:MinecraftGUIFactoryCreates a new SpigotGUIView with the specified size and title.- Specified by:
createSpigotViewin interfaceMinecraftGUIFactory- 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
Description copied from interface:MinecraftGUIFactoryCreates a new InventoryButton with the specified item and command.- Specified by:
createButtonin interfaceMinecraftGUIFactory- Type Parameters:
Command- the command type- Parameters:
itemStack- the item stack to displaycommand- 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:MinecraftGUIFactoryCreates a new InventoryButton with the specified item, command, and display name.- Specified by:
createButtonin interfaceMinecraftGUIFactory- Type Parameters:
Command- the command type- Parameters:
itemStack- the base item stackcommand- the command to execute when clickeddisplayName- the display name for the item- Returns:
- a new InventoryButton instance with custom display name
-