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

public class GuiListener extends Object implements org.bukkit.event.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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEntityPickupItem​(@NotNull org.bukkit.event.entity.EntityPickupItemEvent event)
    Handles users picking up items while their bottom inventory is in use.
    void
    onInventoryClick​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Handles clicks in inventories
    void
    onInventoryClose​(@NotNull org.bukkit.event.inventory.InventoryCloseEvent event)
    Handles closing in inventories
    void
    onInventoryDrag​(@NotNull org.bukkit.event.inventory.InventoryDragEvent event)
    Handles drag events
    void
    onInventoryOpen​(@NotNull org.bukkit.event.inventory.InventoryOpenEvent event)
    Registers newly opened inventories
    void
    onPluginDisable​(@NotNull org.bukkit.event.server.PluginDisableEvent event)
    Handles the disabling of the plugin
    void
    resetItemsAnvil​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for anvil guis
    void
    resetItemsBeacon​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for beacon guis
    void
    resetItemsCartographyTable​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for cartography table guis
    void
    resetItemsEnchantingTable​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for enchanting table guis
    void
    resetItemsGrindstone​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for grindstone guis
    void
    resetItemsSmithingTable​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for smithing table guis
    void
    resetItemsStonecutter​(@NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    Resets the items into the correct positions for stonecutter guis

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GuiListener

      public GuiListener()
  • Method Details

    • onInventoryClick

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

      public void resetItemsAnvil(@NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event)
      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 org.bukkit.event.inventory.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 org.bukkit.event.inventory.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 org.bukkit.event.inventory.InventoryClickEvent event)
      Resets the items into the correct positions for enchanting table guis
      Parameters:
      event - the event fired
      Since:
      0.8.0
    • resetItemsGrindstone

      public void resetItemsGrindstone(@NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event)
      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 org.bukkit.event.inventory.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 org.bukkit.event.inventory.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 org.bukkit.event.entity.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 org.bukkit.event.inventory.InventoryDragEvent event)
      Handles drag events
      Parameters:
      event - the event fired
      Since:
      0.6.1
    • onInventoryClose

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

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

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