Class InventoryActions
java.lang.Object
de.eldoria.eldoutilities.inventory.InventoryActions
Represens a set of
ActionItem
s.
Essentially a wrapper for a previously created inventory.
Handles inserting of items and event handling together with InventoryActionHandler
- Since:
- 1.1.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAction
(ActionItem action) Adds an action to the inventory actions.void
addAction
(org.bukkit.inventory.ItemStack itemStack, int slot, Consumer<org.bukkit.event.inventory.InventoryClickEvent> onClick, Consumer<@Nullable org.bukkit.inventory.ItemStack> onClose) static InventoryActions
of
(org.bukkit.inventory.Inventory inventory) static InventoryActions
of
(org.bukkit.inventory.Inventory inventory, Consumer<org.bukkit.event.inventory.InventoryCloseEvent> onClose) void
onInventoryClick
(org.bukkit.event.inventory.InventoryClickEvent event) void
onInventoryClose
(org.bukkit.event.inventory.InventoryCloseEvent event)
-
Method Details
-
of
-
of
public static InventoryActions of(org.bukkit.inventory.Inventory inventory, Consumer<org.bukkit.event.inventory.InventoryCloseEvent> onClose) -
addAction
Adds an action to the inventory actions.Accoding to the documentation of
ActionItem
the item stack will be added at the given pos to the inventory.- Parameters:
action
- action to add
-
addAction
-
onInventoryClose
public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event) -
onInventoryClick
public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)
-