Class InventoryActions

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

public final class InventoryActions extends Object
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 Details

    • of

      public static InventoryActions of(org.bukkit.inventory.Inventory inventory)
    • of

      public static InventoryActions of(org.bukkit.inventory.Inventory inventory, Consumer<org.bukkit.event.inventory.InventoryCloseEvent> onClose)
    • addAction

      public void addAction(ActionItem action)
      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

      public void addAction(org.bukkit.inventory.ItemStack itemStack, int slot, Consumer<org.bukkit.event.inventory.InventoryClickEvent> onClick, Consumer<@Nullable org.bukkit.inventory.ItemStack> onClose)
    • onInventoryClose

      public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)
    • onInventoryClick

      public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)