Class AbstractGui

java.lang.Object
com.github.darksoulq.abyssallib.world.gui.Gui
com.github.darksoulq.abyssallib.world.gui.AbstractGui

@Deprecated(forRemoval=true, since="1.4.0") public abstract class AbstractGui extends Gui
Deprecated, for removal: This API element is subject to removal in a future version.
Will be removed soon
An abstract base implementation of a Graphical User Interface (GUI). This class serves as a template for creating custom menus by providing lifecycle hooks and simplified methods for managing elements, flags, and layers.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.github.darksoulq.abyssallib.world.gui.Gui

    Gui.Builder
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractGui(org.bukkit.inventory.MenuType menuType, net.kyori.adventure.text.Component title, int tickInterval)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a new AbstractGui with the specified menu type and title.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enables a specific behavior or restriction flag for this GUI.
    void
    addFlags(GuiFlag... flags)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enables multiple behavior or restriction flags for this GUI.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Adds a functional layer to the GUI.
    void
    set(SlotPosition pos, GuiElement element)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Assigns a GuiElement to a specific position within the GUI grid.

    Methods inherited from class com.github.darksoulq.abyssallib.world.gui.Gui

    builder, getElements, getFlags, getLayers, getMenuType, getOnClose, getOnOpen, getTickers, getTickInterval, getTitle, hasFlag

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractGui

      public AbstractGui(org.bukkit.inventory.MenuType menuType, net.kyori.adventure.text.Component title, int tickInterval)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new AbstractGui with the specified menu type and title. Initializes internal collections including a HashMap for elements and LinkedLists for layers and animations.
      Parameters:
      menuType - The MenuType defining the size and shape of the inventory.
      title - The Component representing the display name of the menu.
      tickInterval - The interval between each GuiView#render call
  • Method Details

    • set

      public void set(SlotPosition pos, GuiElement element)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assigns a GuiElement to a specific position within the GUI grid.
      Parameters:
      pos - The SlotPosition where the element should be placed.
      element - The GuiElement to be rendered at the specified position.
    • addFlag

      public void addFlag(GuiFlag flag)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enables a specific behavior or restriction flag for this GUI.
      Parameters:
      flag - The GuiFlag to be added to the GUI configuration.
    • addFlags

      public void addFlags(GuiFlag... flags)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enables multiple behavior or restriction flags for this GUI.
      Parameters:
      flags - A varargs array of GuiFlag constants to be added.
    • addLayer

      public void addLayer(GuiLayer layer)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Adds a functional layer to the GUI. Layers are processed to determine element visibility and interaction priority.
      Parameters:
      layer - The GuiLayer to append to the GUI's layer stack.