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
The masks with multiple slot
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMultiSlotsMask
(@NotNull String name, @NotNull MaskSlot maskSlot) Create a new mask -
Method Summary
Modifier and TypeMethodDescription<T extends Button>
MultiSlotsMaskaddButton
(@NotNull Collection<@NotNull T> buttons) Add button(s)Add button(s)generateButtons
(@NotNull UUID uuid, @NotNull InventorySize inventorySize) Generate the buttons for the unique idGet the buttons@NotNull MaskSlot
Get the mask slotvoid
init()
Initialize some properties for the objectvoid
stop()
Stop the object
-
Field Details
-
maskSlot
-
buttons
-
-
Constructor Details
-
MultiSlotsMask
Create a new mask- Parameters:
name
- the name of the maskmaskSlot
- 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
Add button(s)- Parameters:
button
- the button- Returns:
- this instance
-
getMaskSlot
Get the mask slot- Returns:
- the mask slot
-
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 idinventorySize
- 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
-