Class GuiListener

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
    • 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
    • onPlayerDropItem

      public void onPlayerDropItem(@NotNull @NotNull PlayerDropItemEvent event)
      Handles removing identifiers from gui items when an item is dropped from the gui.
      Parameters:
      event - the event fired
      Since:
      0.12.0
    • 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