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 Summary

    Modifier and Type
    Method
    Description
    static Consumer<org.bukkit.event.inventory.InventoryClickEvent>
    booleanToggle(org.bukkit.NamespacedKey key)
    Gets a consumer which allows to toggle a boolean value.
    static Consumer<org.bukkit.event.inventory.InventoryClickEvent>
    getDoubleRange(org.bukkit.NamespacedKey key, double min, double max)
    Get a consumer which allows to raise and lower a value between a range.
    static Consumer<org.bukkit.event.inventory.InventoryClickEvent>
    getIntRange(org.bukkit.NamespacedKey key, int min, int max)
    Get a consumer which allows to raise and lower a value between a range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getIntRange

      public static Consumer<org.bukkit.event.inventory.InventoryClickEvent> getIntRange(org.bukkit.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<org.bukkit.event.inventory.InventoryClickEvent> getDoubleRange(org.bukkit.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<org.bukkit.event.inventory.InventoryClickEvent> booleanToggle(org.bukkit.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