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 MaskGet the default mask@Nullable MaskGet the mask for the unique idGet the user-mask mapvoidinit()Initialize the element.voidsetDefaultMask(@NotNull Mask defaultMask) Set the default maskvoidSet the mask for the unique idvoidstop()Stop the element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.craftux.common.Mask
getActionMap
-
Field Details
-
userMasks
-
defaultMask
-
-
Constructor Details
-
PlaceholderMask
public PlaceholderMask()
-
-
Method Details
-
init
public void init()Description copied from interface:ElementInitialize the element. Should be called before adding to the GUI. -
stop
public void stop()Description copied from interface:ElementStop the element. Should be called after removing from the GUI. -
apply
Description copied from interface:MaskGet 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
-