Class ActionConsumer

java.lang.Object
de.eldoria.eldoutilities.inventory.ActionConsumer

public final class ActionConsumer extends Object
Class which holds some simple consumers which can be used in a ActionItem.
Since:
1.2.3
  • Method Details

    • getIntRange

      public static Consumer<InventoryClickEvent> getIntRange(NamespacedKey key, int min, int max)
      Get a consumer which allows to raise and lower a value between a range.
      Parameters:
      key - key of value
      min - min value. inclusive.
      max - max value. inclusive.
      Returns:
      consumer with range
    • getDoubleRange

      public static Consumer<InventoryClickEvent> getDoubleRange(NamespacedKey key, double min, double max)
      Get a consumer which allows to raise and lower a value between a range.
      Parameters:
      key - key of value
      min - min value. inclusive.
      max - max value. inclusive.
      Returns:
      consumer with range
    • booleanToggle

      public static Consumer<InventoryClickEvent> booleanToggle(NamespacedKey key)
      Gets a consumer which allows to toggle a boolean value. Used for PersistentDataType.BYTE fields.
      Parameters:
      key - key of value
      Returns:
      consumer for boolean