Class GUIHolder

java.lang.Object
me.hsgamer.hscore.ui.BaseHolder<GUIDisplay>
me.hsgamer.hscore.minestom.gui.GUIHolder
All Implemented Interfaces:
Holder<GUIDisplay>, Initializable, Updatable

public class GUIHolder extends BaseHolder<GUIDisplay>
The base Holder for UI in Minestom
  • Constructor Details

    • GUIHolder

      public GUIHolder()
  • Method Details

    • isRemoveDisplayOnClose

      public boolean isRemoveDisplayOnClose()
      Check if the holder should remove the display on its close
      Returns:
      true if it should
    • setRemoveDisplayOnClose

      public void setRemoveDisplayOnClose(boolean removeDisplayOnClose)
      Set that the display should be removed on close event
      Parameters:
      removeDisplayOnClose - whether the display should be removed on close event
    • getInventoryType

      public net.minestom.server.inventory.InventoryType getInventoryType()
      Get the inventory type
      Returns:
      the inventory type
    • setInventoryType

      public void setInventoryType(net.minestom.server.inventory.InventoryType inventoryType)
      Set the inventory type
      Parameters:
      inventoryType - the inventory type
    • getTitleFunction

      public Function<UUID,net.kyori.adventure.text.Component> getTitleFunction()
      Get the title function
      Returns:
      the title function
    • setTitleFunction

      public void setTitleFunction(Function<UUID,net.kyori.adventure.text.Component> titleFunction)
      Set the title function
      Parameters:
      titleFunction - the title function
    • getTitle

      public net.kyori.adventure.text.Component getTitle(UUID uuid)
      Get the title for the unique id
      Parameters:
      uuid - the unique id
      Returns:
      the title
      See Also:
    • setTitle

      public void setTitle(net.kyori.adventure.text.Component title)
      Set the title
      Parameters:
      title - the title
      See Also:
    • getCloseFilter

      public Predicate<UUID> getCloseFilter()
      Get the close filter
      Returns:
      the close filter
    • setCloseFilter

      public void setCloseFilter(Predicate<UUID> closeFilter)
      Set the close filter
      Parameters:
      closeFilter - the close filter
    • getButtonMap

      public ButtonMap getButtonMap()
      Get the button map
      Returns:
      the button map
    • setButtonMap

      public void setButtonMap(ButtonMap buttonMap)
      Set the button map
      Parameters:
      buttonMap - the button map
    • newDisplay

      protected GUIDisplay newDisplay(UUID uuid)
      Specified by:
      newDisplay in class BaseHolder<GUIDisplay>
    • init

      public void init()
    • onOpen

      protected void onOpen(net.minestom.server.event.inventory.InventoryOpenEvent event)
      Handle open event
      Parameters:
      event - the event
    • onClick

      protected void onClick(net.minestom.server.event.inventory.InventoryPreClickEvent event)
      Handle click event
      Parameters:
      event - the event
    • onClick

      protected void onClick(net.minestom.server.event.inventory.InventoryClickEvent event)
      Handle click event
      Parameters:
      event - the event
    • onClose

      protected void onClose(net.minestom.server.event.inventory.InventoryCloseEvent event)
      Handle close event
      Parameters:
      event - the event