Class DefaultGuiRenderEngine

java.lang.Object
io.github.toberocat.guiengine.render.DefaultGuiRenderEngine
All Implemented Interfaces:
GuiRenderEngine

public class DefaultGuiRenderEngine extends Object implements GuiRenderEngine
DefaultGuiRenderEngine is an implementation of the GuiRenderEngine interface responsible for rendering GUIs.

Created: 04/02/2023 Author: Tobias Madlberger (Tobias)

  • Field Details

    • viewManager

      @NotNull protected final @NotNull DefaultGuiViewManager 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

      @NotNull public @NotNull DefaultGuiViewManager getGuiViewManager()
      Retrieves the GuiViewManager associated with this render engine.
      Specified by:
      getGuiViewManager in interface GuiRenderEngine
      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 interface GuiRenderEngine
      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.