Class PredicateMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.PredicateMask
- All Implemented Interfaces:
Mask
,Initializable
The mask with predicate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateButtons
(@NotNull UUID uuid, @NotNull InventorySize inventorySize) Generate the buttons for the unique id@NotNull Mask
Get the fallback mask@NotNull Mask
getMask()
Get the maskvoid
init()
Initialize some properties for the objectsetFallbackMask
(@NotNull Mask fallbackMask) Set the fallback maskSet the masksetViewPredicate
(@NotNull Predicate<@NotNull UUID> viewPredicate) Set the view predicatevoid
stop()
Stop the object
-
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
-
generateButtons
public Optional<Map<Integer,Button>> generateButtons(@NotNull @NotNull UUID uuid, @NotNull @NotNull InventorySize inventorySize) Description copied from interface:Mask
Generate the buttons for the unique id- Parameters:
uuid
- the unique idinventorySize
- the size of the inventory- Returns:
- the map contains the slots and the buttons
-
init
public void init()Description copied from interface:Initializable
Initialize some properties for the object -
stop
public void stop()Description copied from interface:Initializable
Stop the object
-