Class SimpleButtonMask

java.lang.Object
io.github.projectunified.craftux.simple.SimpleButtonMask
All Implemented Interfaces:
Element, Mask

public class SimpleButtonMask extends Object implements Element, Mask
A simple button mask
  • Constructor Details

    • SimpleButtonMask

      public SimpleButtonMask()
  • Method Details

    • setButton

      public void setButton(Position position, @NotNull @NotNull Button button)
      Set the button
      Parameters:
      position - the position
      button - the button
    • 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)