Class DefaultGuiRenderEngine
java.lang.Object
io.github.toberocat.guiengine.render.DefaultGuiRenderEngine
- All Implemented Interfaces:
GuiRenderEngine
DefaultGuiRenderEngine is an implementation of the GuiRenderEngine interface responsible for rendering GUIs.
Created: 04/02/2023 Author: Tobias Madlberger (Tobias)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NotNull DefaultGuiViewManager
The GuiViewManager associated with this render engine. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DefaultGuiRenderEngine instance and initializes it with the GuiViewManager from the plugin. -
Method Summary
Modifier and TypeMethodDescription@NotNull DefaultGuiViewManager
Retrieves the GuiViewManager associated with this render engine.void
renderGui
(@NotNull org.bukkit.inventory.ItemStack[][] renderBuffer, @NotNull GuiContext context, @NotNull org.bukkit.entity.Player viewer) Renders the GUI using the provided render buffer, GuiContext, and Player viewer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.toberocat.guiengine.render.GuiRenderEngine
createInventory, showGui
-
Field Details
-
viewManager
The GuiViewManager associated with this render engine.
-
-
Constructor Details
-
DefaultGuiRenderEngine
public DefaultGuiRenderEngine()Creates a new DefaultGuiRenderEngine instance and initializes it with the GuiViewManager from the plugin.
-
-
Method Details
-
getGuiViewManager
Retrieves the GuiViewManager associated with this render engine.- Specified by:
getGuiViewManager
in interfaceGuiRenderEngine
- Returns:
- The GuiViewManager instance.
-
renderGui
public void renderGui(@NotNull @NotNull org.bukkit.inventory.ItemStack[][] renderBuffer, @NotNull @NotNull GuiContext context, @NotNull @NotNull org.bukkit.entity.Player viewer) Renders the GUI using the provided render buffer, GuiContext, and Player viewer.- Specified by:
renderGui
in interfaceGuiRenderEngine
- Parameters:
renderBuffer
- The 2D array of ItemStacks representing the render buffer.context
- The GuiContext to be rendered.viewer
- The Player who will view the rendered GUI.
-