Class InventoryActionHandler

java.lang.Object
de.eldoria.eldoutilities.inventory.InventoryActionHandler
All Implemented Interfaces:
org.bukkit.event.Listener

public class InventoryActionHandler extends Object implements org.bukkit.event.Listener
A InventoryActionHandler allows to handle basic click uis easily.
Since:
1.1.1
  • Constructor Details

    • InventoryActionHandler

      public InventoryActionHandler()
    • InventoryActionHandler

      public InventoryActionHandler(Runnable onClose)
  • Method Details

    • create

      public static InventoryActionHandler create(org.bukkit.plugin.Plugin plugin)
    • create

      public static InventoryActionHandler create(org.bukkit.plugin.Plugin plugin, Runnable onClose)
    • getPluginInventoryHandler

      public static InventoryActionHandler getPluginInventoryHandler(Class<? extends org.bukkit.plugin.Plugin> plugin)
    • wrap

      public InventoryActions wrap(org.bukkit.entity.Player player, org.bukkit.inventory.Inventory inventory)
      Wraps an inventory in inventory actions and registers it.
      Parameters:
      player - player of intenvory actions
      inventory - inventory with actions
      Returns:
      inventory wrapped into inventory actions.
    • wrap

      public InventoryActions wrap(org.bukkit.entity.Player player, org.bukkit.inventory.Inventory inventory, Consumer<org.bukkit.event.inventory.InventoryCloseEvent> onClose)
    • onInventoryClose

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

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