Interface GuiComponentBuilder

All Known Implementing Classes:
AbstractGuiComponentBuilder, EmbeddedGuiComponentBuilder, PagedComponentBuilder, SimpleItemComponentBuilder, ToggleItemComponentBuilder

public interface GuiComponentBuilder
Created: 10.07.2023

This class should make it easier to create inheritable builder patterns. It also tries to NOT merge the create and deserialize function, so you're forced to use variables, making it easier to create a builder pattern (As intended for easier use without requiring an interpreter)

Author:
Tobias Madlberger (Tobias)
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull GuiComponent
    Create a new instance of the GUI component.
    void
    deserialize(@NotNull ParserContext node)
    Deserialize the properties of the GUI component from the provided ParserContext node.
  • Method Details

    • createComponent

      @NotNull @NotNull GuiComponent createComponent()
      Create a new instance of the GUI component.
      Returns:
      A new instance of the GUI component.
    • deserialize

      void deserialize(@NotNull @NotNull ParserContext node) throws IOException
      Deserialize the properties of the GUI component from the provided ParserContext node. This method is used to set the properties of the component using the data from the ParserContext.
      Parameters:
      node - The ParserContext node containing the properties of the GUI component.
      Throws:
      IOException - If there is an error while deserializing the properties.