Class PlaceholderMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.PlaceholderMask
- All Implemented Interfaces:
Mask
,Initializable
The placeholder mask
Used for per-user masks
Used for per-user masks
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateButtons
(@NotNull UUID uuid, @NotNull InventorySize inventorySize) Generate the buttons for the unique id@NotNull Mask
Get the default mask@Nullable Mask
Get the mask for the unique idGet the user-mask mapvoid
init()
Initialize some properties for the objectsetDefaultMask
(@NotNull Mask defaultMask) Set the default masksetInitDefaultMask
(boolean initDefaultMask) Should the default mask be initialized?void
Set the mask for the unique idvoid
stop()
Stop the object
-
Field Details
-
userMasks
-
defaultMask
-
initDefaultMask
protected boolean initDefaultMask
-
-
Constructor Details
-
PlaceholderMask
Create a new mask- Parameters:
name
- the name of the mask
-
-
Method Details
-
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 -
setMask
Set the mask for the unique id- Parameters:
uuid
- the unique idmask
- the mask
-
getMask
Get the mask for the unique id- Parameters:
uuid
- the unique id- Returns:
- the mask
-
getDefaultMask
Get the default mask- Returns:
- the default mask
-
setDefaultMask
Set the default mask- Parameters:
defaultMask
- the default mask- Returns:
- this instance
-
setInitDefaultMask
Should the default mask be initialized?- Parameters:
initDefaultMask
- true if yes- Returns:
- this instance
-
getUserMasks
Get the user-mask map- Returns:
- the user-mask map
-