Class BaseGUIBuilder<G extends GUI,B extends BaseGUIBuilder<G,B>>

java.lang.Object
de.placeblock.betterinventories.builder.gui.BaseGUIBuilder<G,B>
Type Parameters:
G - The type of GUI
B - The type of Builder
All Implemented Interfaces:
Builder<G,B>
Direct Known Subclasses:
BaseCanvasGUIBuilder

public abstract class BaseGUIBuilder<G extends GUI,B extends BaseGUIBuilder<G,B>> extends Object implements Builder<G,B>
Base class for creating GUI-Builders
  • Field Summary

    Fields inherited from interface de.placeblock.betterinventories.builder.Builder

    VALUE_MISSING_EXCEPTION
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract G
    Builds the GUI
    protected org.bukkit.plugin.Plugin
     
    protected net.kyori.adventure.text.TextComponent
     
    protected org.bukkit.event.inventory.InventoryType
     
    title(@NotNull net.kyori.adventure.text.TextComponent title)
    Sets the title of the Inventory.
    type(@NotNull org.bukkit.event.inventory.InventoryType type)
    Sets the type of the Inventory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.placeblock.betterinventories.builder.Builder

    getValue, getValue, getValue
  • Constructor Details

    • BaseGUIBuilder

      public BaseGUIBuilder()
  • Method Details

    • title

      public B title(@NotNull @NotNull net.kyori.adventure.text.TextComponent title)
      Sets the title of the Inventory.
      Parameters:
      title - The title
      Returns:
      this
    • type

      public B type(@NotNull @NotNull org.bukkit.event.inventory.InventoryType type)
      Sets the type of the Inventory. Does not need to be set in many implementing GUIBuilders.
      Parameters:
      type - The type
      Returns:
      this
    • getTitle

      protected net.kyori.adventure.text.TextComponent getTitle()
      Returns:
      The title of the GUI
    • getType

      protected org.bukkit.event.inventory.InventoryType getType()
      Returns:
      The type of the GUI
    • getPlugin

      protected org.bukkit.plugin.Plugin getPlugin()
      Returns:
      The plugin for the GUI
    • build

      public abstract G build()
      Builds the GUI
      Specified by:
      build in interface Builder<G extends GUI,B extends BaseGUIBuilder<G,B>>
      Returns:
      The new GUI