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@Nullable MaskGet the fallback mask@Nullable MaskgetMask()Get the maskvoidinit()Initialize the element.voidsetFallbackMask(@Nullable Mask fallbackMask) Set the fallback maskvoidSet the maskvoidsetViewPredicate(@Nullable Predicate<@NotNull UUID> viewPredicate) Set the view predicatevoidstop()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
-
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: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
-