Class AbstractGui
java.lang.Object
com.github.darksoulq.abyssallib.world.gui.Gui
com.github.darksoulq.abyssallib.world.gui.AbstractGui
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 Gui
Gui.Builder -
Constructor Summary
ConstructorsConstructorDescriptionAbstractGui(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 TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Enables a specific behavior or restriction flag for this GUI.voidDeprecated, for removal: This API element is subject to removal in a future version.Enables multiple behavior or restriction flags for this GUI.voidDeprecated, for removal: This API element is subject to removal in a future version.Adds a functional layer to the GUI.voidset(SlotPosition pos, GuiElement element) Deprecated, for removal: This API element is subject to removal in a future version.Assigns aGuiElementto a specific position within the GUI grid.Methods inherited from class Gui
builder, getElements, getFlags, getLayers, getMenuType, getOnClose, getOnOpen, getTickers, getTickInterval, getTitle, hasFlag
-
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- TheMenuTypedefining the size and shape of the inventory.title- TheComponentrepresenting the display name of the menu.tickInterval- The interval between each GuiView#render call
-
-
Method Details
-
set
Deprecated, for removal: This API element is subject to removal in a future version.Assigns aGuiElementto a specific position within the GUI grid.- Parameters:
pos- TheSlotPositionwhere the element should be placed.element- TheGuiElementto be rendered at the specified position.
-
addFlag
-
addFlags
-
addLayer
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- TheGuiLayerto append to the GUI's layer stack.
-