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

public class PredicateMask extends BaseMask
The mask with predicate
  • Constructor Details

    • PredicateMask

      public PredicateMask(@NotNull @NotNull String name)
      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

      @NotNull public @NotNull Mask getMask()
      Get the mask
      Returns:
      the mask
    • setMask

      @Contract("_ -> this") public PredicateMask setMask(@NotNull @NotNull Mask mask)
      Set the mask
      Parameters:
      mask - the mask
      Returns:
      this instance
    • getFallbackMask

      @NotNull public @NotNull Mask getFallbackMask()
      Get the fallback mask
      Returns:
      the fallback mask
    • setFallbackMask

      @Contract("_ -> this") public PredicateMask setFallbackMask(@NotNull @NotNull Mask fallbackMask)
      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 id
      inventorySize - 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