Class ButtonPaginatedMask

java.lang.Object
io.github.projectunified.craftux.mask.PaginatedMask
io.github.projectunified.craftux.mask.ButtonPaginatedMask
All Implemented Interfaces:
Element, Mask

public abstract class ButtonPaginatedMask extends PaginatedMask
The button paginated mask, those with a long list of buttons divided into pages.
  • Constructor Details

    • ButtonPaginatedMask

      protected ButtonPaginatedMask(@NotNull @NotNull Function<UUID,List<Position>> maskPositionFunction)
      Create a new mask
      Parameters:
      maskPositionFunction - the mask position function
  • Method Details

    • getMaskPositionFunction

      @NotNull public @NotNull Function<UUID,List<Position>> getMaskPositionFunction()
      Get the mask position function
      Returns:
      the mask position function
    • getButtons

      @NotNull public abstract @NotNull List<Button> getButtons(@NotNull @NotNull UUID uuid)
      Get the buttons for the unique id
      Parameters:
      uuid - the unique id
      Returns:
      the buttons
    • getItemMap

      @Nullable protected @Nullable Map<Position,Consumer<ActionItem>> getItemMap(@NotNull @NotNull UUID uuid, int pageNumber)
      Description copied from class: PaginatedMask
      Generate the item map for the unique id
      Specified by:
      getItemMap in class PaginatedMask
      Parameters:
      uuid - the unique id
      pageNumber - the page number
      Returns:
      the map contains the positions and the buttons
    • stop

      public void stop()
      Description copied from interface: Element
      Stop the element. Should be called after removing from the GUI.