Class GuiListener
java.lang.Object
com.github.stefvanschie.inventoryframework.gui.GuiListener
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionGuiListener(@NotNull Plugin plugin) Creates a new listener for all guis for the providedplugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidonEntityPickupItem(@NotNull EntityPickupItemEvent event) Handles users picking up items while their bottom inventory is in use.voidonInventoryClick(@NotNull InventoryClickEvent event) Handles clicks in inventoriesvoidonInventoryClose(@NotNull InventoryCloseEvent event) Handles closing in inventoriesvoidonInventoryDrag(@NotNull InventoryDragEvent event) Handles drag eventsvoidonInventoryOpen(@NotNull InventoryOpenEvent event) Registers newly opened inventoriesvoidonPluginDisable(@NotNull PluginDisableEvent event) Handles the disabling of the pluginvoidonTradeSelect(@NotNull TradeSelectEvent event) Handles the selection of trades in merchant guisvoidresetItemsAnvil(@NotNull InventoryClickEvent event) Deprecated.no longer used internallyvoidresetItemsBeacon(@NotNull InventoryClickEvent event) Resets the items into the correct positions for beacon guisvoidresetItemsCartographyTable(@NotNull InventoryClickEvent event) Resets the items into the correct positions for cartography table guisvoidresetItemsEnchantingTable(@NotNull InventoryClickEvent event) Resets the items into the correct positions for enchanting table guisvoidresetItemsGrindstone(@NotNull InventoryClickEvent event) Deprecated.no longer used internallyvoidresetItemsSmithingTable(@NotNull InventoryClickEvent event) Resets the items into the correct positions for smithing table guisvoidresetItemsStonecutter(@NotNull InventoryClickEvent event) Resets the items into the correct positions for stonecutter guis
-
Constructor Details
-
GuiListener
Creates a new listener for all guis for the providedplugin.- Parameters:
plugin- the owning plugin of this listener- Since:
- 0.10.8
-
-
Method Details
-
onInventoryClick
Handles clicks in inventories- Parameters:
event- the event fired- Since:
- 0.5.4
-
resetItemsAnvil
Deprecated.no longer used internallyResets the items into the correct positions for anvil guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
resetItemsBeacon
Resets the items into the correct positions for beacon guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
resetItemsCartographyTable
Resets the items into the correct positions for cartography table guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
resetItemsEnchantingTable
Resets the items into the correct positions for enchanting table guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
resetItemsGrindstone
Deprecated.no longer used internallyResets the items into the correct positions for grindstone guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
resetItemsStonecutter
Resets the items into the correct positions for stonecutter guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
resetItemsSmithingTable
Resets the items into the correct positions for smithing table guis- Parameters:
event- the event fired- Since:
- 0.8.0
-
onEntityPickupItem
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
Handles drag events- Parameters:
event- the event fired- Since:
- 0.6.1
-
onTradeSelect
Handles the selection of trades in merchant guis- Parameters:
event- the event fired
-
onInventoryClose
Handles closing in inventories- Parameters:
event- the event fired- Since:
- 0.5.4
-
onInventoryOpen
Registers newly opened inventories- Parameters:
event- the event fired- Since:
- 0.5.19
-
onPluginDisable
Handles the disabling of the plugin- Parameters:
event- the event fired- Since:
- 0.5.19
-