Package de.delinkedde.mobarenareborn.gui
Klasse MenuManager
java.lang.Object
de.delinkedde.mobarenareborn.gui.MenuManager
- Alle implementierten Schnittstellen:
Listener
Opens
Menus and routes their inventory events.
While a menu is open all clicks in it are cancelled so the player cannot remove items; clicks on the menu's own slots are dispatched to the menu's actions. The open menu is forgotten on close.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidonClick(@NotNull InventoryClickEvent event) Cancels and dispatches clicks within an open menu.voidonClose(@NotNull InventoryCloseEvent event) Forgets a player's menu when it closes.voidonDrag(@NotNull InventoryDragEvent event) Cancels drag operations while a menu is open, so items cannot be dragged into (and lost in) the menu inventory.voidOpens a menu for a player.
-
Konstruktordetails
-
MenuManager
public MenuManager()
-
-
Methodendetails
-
open
Opens a menu for a player.- Parameter:
player- the playermenu- the menu to open
-
onClick
Cancels and dispatches clicks within an open menu.- Parameter:
event- the click event
-
onDrag
Cancels drag operations while a menu is open, so items cannot be dragged into (and lost in) the menu inventory.- Parameter:
event- the drag event
-
onClose
Forgets a player's menu when it closes.- Parameter:
event- the close event
-