Class ButtonMapMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.ButtonMapMask
- All Implemented Interfaces:
Mask
,Initializable
The mask with a map of slot and button
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a button to the maskAdd a button to the maskgenerateButtons
(@NotNull UUID uuid, @NotNull InventorySize inventorySize) Generate the buttons for the unique idGet the button mapGet the buttonsvoid
init()
Initialize some properties for the objectvoid
stop()
Stop the object
-
Constructor Details
-
ButtonMapMask
Create a new mask- Parameters:
name
- the name of the mask
-
-
Method Details
-
addButton
@Contract("_, _ -> this") public ButtonMapMask addButton(@NotNull @NotNull Button button, @NotNull @NotNull List<@NotNull Integer> slots) Add a button to the mask- Parameters:
button
- the buttonslots
- the slots- Returns:
- this instance
-
addButton
@Contract("_, _ -> this") public ButtonMapMask addButton(@NotNull @NotNull Button button, int... slots) Add a button to the mask- Parameters:
button
- the buttonslots
- the slots- Returns:
- this instance
-
getButtons
Get the buttons- Returns:
- the buttons
-
getButtonMap
Get the button map- Returns:
- the button map
-
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
-