Class ParamFrame<P>

java.lang.Object
space.maxus.flare.ui.Frame
space.maxus.flare.ui.frames.ParamFrame<P>
Type Parameters:
P - Type of frame props.
All Implemented Interfaces:
ReactivityProvider
Direct Known Subclasses:
PageFrame

public abstract class ParamFrame<P> extends Frame
A simple frame that can take in extra props.
  • Field Details

    • dimensions

      @NotNull protected final @NotNull Dimensions dimensions
    • props

      @NotNull protected final P props
    • holder

      @NotNull protected @NotNull ReactiveInventoryHolder holder
  • Constructor Details

    • ParamFrame

      protected ParamFrame(@NotNull P params)
    • ParamFrame

      public ParamFrame(@NotNull P params, @NotNull @NotNull Dimensions dimensions)
  • Method Details

    • preInit

      public void preInit(P params)
    • init

      public abstract void init()
      Description copied from class: Frame
      Called once inside the constructor
      Specified by:
      init in class Frame
    • selfInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory selfInventory()
      Description copied from class: Frame
      Gets the inventory of this frame.
      Specified by:
      selfInventory in class Frame
      Returns:
      the inventory of this frame.
    • getDimensions

      @NotNull public @NotNull Dimensions getDimensions()
      Description copied from class: Frame
      Gets the dimensions of this frame's inventory
      Specified by:
      getDimensions in class Frame
      Returns:
      the dimensions of this frame's inventory
    • getHolder

      @NotNull public @NotNull ReactiveInventoryHolder getHolder()
      Description copied from class: Frame
      Gets the Flare InventoryHolder for this frame
      Specified by:
      getHolder in class Frame
      Returns:
      Flare InventoryHolder
    • setHolder

      public void setHolder(@NotNull @NotNull ReactiveInventoryHolder holder)
      Description copied from class: Frame
      Sets the holder for this frame This is an internal method, it is only used for frame-switching
      Specified by:
      setHolder in class Frame
      Parameters:
      holder - Holder to be set