Class InventoryActionHandler
java.lang.Object
de.eldoria.eldoutilities.inventory.InventoryActionHandler
- All Implemented Interfaces:
org.bukkit.event.Listener
A InventoryActionHandler allows to handle basic click uis easily.
- Since:
- 1.1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InventoryActionHandler
create
(org.bukkit.plugin.Plugin plugin) static InventoryActionHandler
static InventoryActionHandler
getPluginInventoryHandler
(Class<? extends org.bukkit.plugin.Plugin> plugin) void
onInventoryClick
(org.bukkit.event.inventory.InventoryClickEvent event) void
onInventoryClose
(org.bukkit.event.inventory.InventoryCloseEvent event) wrap
(org.bukkit.entity.Player player, org.bukkit.inventory.Inventory inventory) Wraps an inventory in inventory actions and registers it.wrap
(org.bukkit.entity.Player player, org.bukkit.inventory.Inventory inventory, Consumer<org.bukkit.event.inventory.InventoryCloseEvent> onClose)
-
Constructor Details
-
InventoryActionHandler
public InventoryActionHandler() -
InventoryActionHandler
-
-
Method Details
-
create
-
create
-
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 actionsinventory
- 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)
-