Class InventoryActions
java.lang.Object
de.eldoria.eldoutilities.inventory.InventoryActions
Represens a set of
ActionItems.
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 TypeMethodDescriptionvoidaddAction(ActionItem action) Adds an action to the inventory actions.voidaddAction(org.bukkit.inventory.ItemStack itemStack, int slot, Consumer<org.bukkit.event.inventory.InventoryClickEvent> onClick, Consumer<@Nullable org.bukkit.inventory.ItemStack> onClose) static InventoryActionsof(org.bukkit.inventory.Inventory inventory) static InventoryActionsof(org.bukkit.inventory.Inventory inventory, Consumer<org.bukkit.event.inventory.InventoryCloseEvent> onClose) voidonInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event) voidonInventoryClose(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
ActionItemthe 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)
-