Class MultiSlotsMask

java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.MultiSlotsMask
All Implemented Interfaces:
Mask, Initializable

public class MultiSlotsMask extends BaseMask
The masks with multiple slot
  • Field Details

    • maskSlot

      protected final MaskSlot maskSlot
    • buttons

      protected final List<Button> buttons
  • Constructor Details

    • MultiSlotsMask

      public MultiSlotsMask(@NotNull @NotNull String name, @NotNull @NotNull MaskSlot maskSlot)
      Create a new mask
      Parameters:
      name - the name of the mask
      maskSlot - the mask slot
  • Method Details

    • addButton

      @Contract("_ -> this") public <T extends Button> MultiSlotsMask addButton(@NotNull @NotNull Collection<@NotNull T> buttons)
      Add button(s)
      Type Parameters:
      T - the type of the button
      Parameters:
      buttons - the buttons
      Returns:
      this instance
    • addButton

      @Contract("_ -> this") public MultiSlotsMask addButton(@NotNull @NotNull Button... button)
      Add button(s)
      Parameters:
      button - the button
      Returns:
      this instance
    • getMaskSlot

      @NotNull public @NotNull MaskSlot getMaskSlot()
      Get the mask slot
      Returns:
      the mask slot
    • getButtons

      @NotNull public @NotNull List<@NotNull Button> getButtons()
      Get the buttons
      Returns:
      the buttons
    • generateButtons

      public Optional<Map<Integer,Button>> generateButtons(@NotNull @NotNull UUID uuid, @NotNull @NotNull InventorySize inventorySize)
      Description copied from interface: Mask
      Generate the buttons for the unique id
      Parameters:
      uuid - the unique id
      inventorySize - the size of the inventory
      Returns:
      the map contains the slots and the buttons
    • init

      public void init()
      Description copied from interface: Initializable
      Initialize some properties for the object
    • stop

      public void stop()
      Description copied from interface: Initializable
      Stop the object