Package me.hsgamer.hscore.minestom.gui
Class MinestomGUIHolder
java.lang.Object
me.hsgamer.hscore.minecraft.gui.holder.GUIHolder<MinestomInventoryContext>
me.hsgamer.hscore.minestom.gui.MinestomGUIHolder
- All Implemented Interfaces:
GUIElement
The
GUIHolder for Minestom-
Constructor Summary
ConstructorsConstructorDescriptionMinestomGUIHolder(UUID viewerID, Function<UUID, net.minestom.server.inventory.Inventory> inventoryFunction) Create a new holder -
Method Summary
Modifier and TypeMethodDescriptionprotected MinestomInventoryContextCreate the inventory contextvoidinit()Initialize the element.voidOpen the inventoryprotected voidsetItem(int slot, @Nullable ActionItem item) Set the item in the slotvoidstop()Stop the element.Methods inherited from class me.hsgamer.hscore.minecraft.gui.holder.GUIHolder
canSetItem, getButtonMap, getInventoryContext, getItem, getItemMap, getViewerID, handleClick, handleClose, handleOpen, open, setButtonMap, update
-
Constructor Details
-
Method Details
-
createInventoryContext
Description copied from class:GUIHolderCreate the inventory context- Specified by:
createInventoryContextin classGUIHolder<MinestomInventoryContext>- Returns:
- the inventory context
-
setItem
Description copied from class:GUIHolderSet the item in the slot- Specified by:
setItemin classGUIHolder<MinestomInventoryContext>- Parameters:
slot- the slotitem- the item
-
open
Description copied from class:GUIHolderOpen the inventory- Specified by:
openin classGUIHolder<MinestomInventoryContext>- Parameters:
uuid- the unique ID of the player
-
init
public void init()Description copied from interface:GUIElementInitialize the element. Should be called before adding to the GUI.- Specified by:
initin interfaceGUIElement- Overrides:
initin classGUIHolder<MinestomInventoryContext>
-
stop
public void stop()Description copied from interface:GUIElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceGUIElement- Overrides:
stopin classGUIHolder<MinestomInventoryContext>
-