Class SingleMask

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

public class SingleMask extends Object implements Element, Mask
The simple mask with a single button
  • Field Details

    • position

      protected final Position position
    • button

      protected final Button button
  • Constructor Details

    • SingleMask

      public SingleMask(Position position, Button button)
      Create a new mask
      Parameters:
      position - the position
      button - the button
  • Method Details

    • init

      public void init()
      Description copied from interface: Element
      Initialize the element. Should be called before adding to the GUI.
      Specified by:
      init in interface Element
    • stop

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

      @NotNull public @NotNull Map<Position,Consumer<ActionItem>> apply(@NotNull @NotNull UUID uuid)
      Description copied from interface: Mask
      Get a map of positions to action item consumers
      Specified by:
      apply in interface Mask
      Parameters:
      uuid - the uuid of the player
      Returns:
      the map, or null if no items should be displayed. Can return null in a conditional case (e.g. predicate mask)