Class PredicateMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.PredicateMask
- All Implemented Interfaces:
Mask,me.hsgamer.hscore.ui.property.Initializable
The mask with predicate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the target can view the maskgenerateButtons(@NotNull UUID uuid) Generate the buttons for the unique id@NotNull MaskGet the fallback mask@NotNull MaskgetMask()Get the maskvoidinit()setFallbackMask(@NotNull Mask fallbackMask) Set the fallback maskSet the masksetViewPredicate(@NotNull Predicate<@NotNull UUID> viewPredicate) Set the view predicatevoidstop()
-
Constructor Details
-
PredicateMask
Create a new mask- Parameters:
name- the name of the mask
-
-
Method Details
-
setViewPredicate
@Contract("_ -> this") public PredicateMask setViewPredicate(@NotNull @NotNull Predicate<@NotNull UUID> viewPredicate) Set the view predicate- Parameters:
viewPredicate- the view predicate- Returns:
- this instance
-
getMask
Get the mask- Returns:
- the mask
-
setMask
Set the mask- Parameters:
mask- the mask- Returns:
- this instance
-
getFallbackMask
Get the fallback mask- Returns:
- the fallback mask
-
setFallbackMask
Set the fallback mask- Parameters:
fallbackMask- the fallback mask- Returns:
- this instance
-
canView
Description copied from interface:MaskCheck if the target can view the mask- Parameters:
uuid- the unique id of the target- Returns:
- true if the target can view the mask
-
generateButtons
Description copied from interface:MaskGenerate the buttons for the unique id- Parameters:
uuid- the unique id- Returns:
- the map contains the slots and the buttons
-
init
public void init() -
stop
public void stop()
-