Class PlaceholderMask
java.lang.Object
io.github.projectunified.craftux.mask.PlaceholderMask
The placeholder mask
Used for per-user masks
Used for per-user masks
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map
<Position, Consumer<ActionItem>> Get a map of positions to action item consumers@NotNull Mask
Get the default mask@Nullable Mask
Get the mask for the unique idGet the user-mask mapvoid
init()
Initialize the element.void
setDefaultMask
(@NotNull Mask defaultMask) Set the default maskvoid
Set the mask for the unique idvoid
stop()
Stop the element.
-
Field Details
-
userMasks
-
defaultMask
-
-
Constructor Details
-
PlaceholderMask
public PlaceholderMask()
-
-
Method Details
-
init
public void init()Description copied from interface:Element
Initialize the element. Should be called before adding to the GUI. -
stop
public void stop()Description copied from interface:Element
Stop the element. Should be called after removing from the GUI. -
apply
Description copied from interface:Mask
Get a map of positions to action item consumers -
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
-
getUserMasks
Get the user-mask map- Returns:
- the user-mask map
-