Class Menus
java.lang.Object
ua.mcchickenstudio.opencreative.menus.Menus
- All Implemented Interfaces:
org.bukkit.event.Listener
Menus
This class represents a menu manager, that stores current opened menus for handling inventory open, click and close events.
To make InventoryMenu usable for handling inventory events, register this menus with
addMenu(InventoryMenu) method. To avoid memory leaks, please unregister it
on inventory close event with removeMenu(InventoryMenu)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMenu(InventoryMenu menu) Registers menus in menus manager for handling inventory events.static voidonBlockDestroy(org.bukkit.Location location) voidonClick(org.bukkit.event.inventory.InventoryClickEvent event) voidonClose(org.bukkit.event.inventory.InventoryCloseEvent event) voidonOpen(org.bukkit.event.inventory.InventoryOpenEvent event) static voidremoveMenu(InventoryMenu menu) Unregisters menus from menus event listeners, required if menus is not more useful because player closed it.
-
Constructor Details
-
Menus
public Menus()
-
-
Method Details
-
onBlockDestroy
public static void onBlockDestroy(org.bukkit.Location location) -
onClick
public void onClick(org.bukkit.event.inventory.InventoryClickEvent event) -
onOpen
public void onOpen(org.bukkit.event.inventory.InventoryOpenEvent event) -
onClose
public void onClose(org.bukkit.event.inventory.InventoryCloseEvent event)
-