Class ActionConsumer
java.lang.Object
de.eldoria.eldoutilities.inventory.ActionConsumer
Class which holds some simple consumers which can be used in a
ActionItem.- Since:
- 1.2.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 valuemin- 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 valuemin- 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 forPersistentDataType.BYTEfields.- Parameters:
key- key of value- Returns:
- consumer for boolean
-