java.lang.Object
com.github.stefvanschie.inventoryframework.gui.GuiListener
All Implemented Interfaces:
Listener

public class GuiListener extends Object implements Listener
Listens to events for Guis. Only one instance of this class gets constructed. (One instance per plugin, but plugins are supposed to shade and relocate IF.)
Since:
0.5.4
  • Constructor Details

    • GuiListener

      public GuiListener(@NotNull @NotNull Plugin plugin)
      Creates a new listener for all guis for the provided plugin.
      Parameters:
      plugin - the owning plugin of this listener
      Since:
      0.10.8
  • Method Details

    • onInventoryClick

      public void onInventoryClick(@NotNull @NotNull InventoryClickEvent event)
      Handles clicks in inventories
      Parameters:
      event - the event fired
      Since:
      0.5.4
    • resetItemsAnvil

      @Deprecated public void resetItemsAnvil(@NotNull @NotNull InventoryClickEvent event)
      Deprecated.
      no longer used internally
      Resets the items into the correct positions for anvil guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsBeacon

      public void resetItemsBeacon(@NotNull @NotNull InventoryClickEvent event)
      Resets the items into the correct positions for beacon guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsCartographyTable

      public void resetItemsCartographyTable(@NotNull @NotNull InventoryClickEvent event)
      Resets the items into the correct positions for cartography table guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsEnchantingTable

      public void resetItemsEnchantingTable(@NotNull @NotNull InventoryClickEvent event)
      Resets the items into the correct positions for enchanting table guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsGrindstone

      @Deprecated public void resetItemsGrindstone(@NotNull @NotNull InventoryClickEvent event)
      Deprecated.
      no longer used internally
      Resets the items into the correct positions for grindstone guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsStonecutter

      public void resetItemsStonecutter(@NotNull @NotNull InventoryClickEvent event)
      Resets the items into the correct positions for stonecutter guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsSmithingTable

      public void resetItemsSmithingTable(@NotNull @NotNull InventoryClickEvent event)
      Resets the items into the correct positions for smithing table guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • onEntityPickupItem

      public void onEntityPickupItem(@NotNull @NotNull EntityPickupItemEvent event)
      Handles users picking up items while their bottom inventory is in use.
      Parameters:
      event - the event fired when an entity picks up an item
      Since:
      0.6.1
    • onInventoryDrag

      public void onInventoryDrag(@NotNull @NotNull InventoryDragEvent event)
      Handles drag events
      Parameters:
      event - the event fired
      Since:
      0.6.1
    • onTradeSelect

      public void onTradeSelect(@NotNull @NotNull TradeSelectEvent event)
      Handles the selection of trades in merchant guis
      Parameters:
      event - the event fired
    • onInventoryClose

      public void onInventoryClose(@NotNull @NotNull InventoryCloseEvent event)
      Handles closing in inventories
      Parameters:
      event - the event fired
      Since:
      0.5.4
    • onInventoryOpen

      public void onInventoryOpen(@NotNull @NotNull InventoryOpenEvent event)
      Registers newly opened inventories
      Parameters:
      event - the event fired
      Since:
      0.5.19
    • onPluginDisable

      public void onPluginDisable(@NotNull @NotNull PluginDisableEvent event)
      Handles the disabling of the plugin
      Parameters:
      event - the event fired
      Since:
      0.5.19