Class PredicateMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.PredicateMask
- All Implemented Interfaces:
Function<@NotNull InventoryContext,,@Nullable Map<Integer, ActionItem>> GUIElement
public class PredicateMask
extends Object
implements GUIElement, Function<@NotNull InventoryContext,@Nullable Map<Integer,ActionItem>>
The mask with predicate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map<Integer, ActionItem> apply(@NotNull InventoryContext context) @NotNull Function<@NotNull InventoryContext, @Nullable Map<Integer, ActionItem>> Get the fallback mask@NotNull Function<@NotNull InventoryContext, @Nullable Map<Integer, ActionItem>> getMask()Get the maskvoidinit()Initialize the element.voidsetFallbackMask(@NotNull Function<@NotNull InventoryContext, @Nullable Map<Integer, ActionItem>> fallbackMask) Set the fallback maskvoidsetMask(@NotNull Function<@NotNull InventoryContext, @Nullable Map<Integer, ActionItem>> mask) Set the maskvoidsetViewPredicate(@NotNull Predicate<@NotNull UUID> viewPredicate) Set the view predicatevoidstop()Stop the element.
-
Constructor Details
-
PredicateMask
public PredicateMask()
-
-
Method Details
-
setViewPredicate
Set the view predicate- Parameters:
viewPredicate- the view predicate
-
getMask
@NotNull public @NotNull Function<@NotNull InventoryContext,@Nullable Map<Integer, getMask()ActionItem>> Get the mask- Returns:
- the mask
-
setMask
public void setMask(@NotNull @NotNull Function<@NotNull InventoryContext, @Nullable Map<Integer, ActionItem>> mask) Set the mask- Parameters:
mask- the mask
-
getFallbackMask
@NotNull public @NotNull Function<@NotNull InventoryContext,@Nullable Map<Integer, getFallbackMask()ActionItem>> Get the fallback mask- Returns:
- the fallback mask
-
setFallbackMask
public void setFallbackMask(@NotNull @NotNull Function<@NotNull InventoryContext, @Nullable Map<Integer, ActionItem>> fallbackMask) Set the fallback mask- Parameters:
fallbackMask- the fallback mask
-
init
public void init()Description copied from interface:GUIElementInitialize the element. Should be called before adding to the GUI.- Specified by:
initin interfaceGUIElement
-
stop
public void stop()Description copied from interface:GUIElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceGUIElement
-
apply
@Nullable public @Nullable Map<Integer,ActionItem> apply(@NotNull @NotNull InventoryContext context) - Specified by:
applyin interfaceFunction<@NotNull InventoryContext,@Nullable Map<Integer, ActionItem>>
-