Class PredicateMask
java.lang.Object
io.github.projectunified.craftux.mask.PredicateMask
The mask with predicate
-
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 fallback mask@NotNull Mask
getMask()
Get the maskvoid
init()
Initialize the element.void
setFallbackMask
(@NotNull Mask fallbackMask) Set the fallback maskvoid
Set the maskvoid
setViewPredicate
(@NotNull Predicate<@NotNull UUID> viewPredicate) Set the view predicatevoid
stop()
Stop the element.
-
Constructor Details
-
PredicateMask
public PredicateMask()
-
-
Method Details
-
setViewPredicate
Set the view predicate- Parameters:
viewPredicate
- the view predicate
-
getMask
Get the mask- Returns:
- the mask
-
setMask
Set the mask- Parameters:
mask
- the mask
-
getFallbackMask
Get the fallback mask- Returns:
- the fallback mask
-
setFallbackMask
Set the fallback mask- Parameters:
fallbackMask
- the fallback mask
-
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
-