Package dev.majek.pc.gui
Class GuiHandler
- java.lang.Object
-
- dev.majek.pc.mechanic.Mechanic
-
- dev.majek.pc.gui.GuiHandler
-
- All Implemented Interfaces:
org.bukkit.event.Listener
public class GuiHandler extends Mechanic
Handles registering active GUIs and managing inventory events.
-
-
Constructor Summary
Constructors Constructor Description GuiHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GuiToggle
getToggle(String name)
void
onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)
void
onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)
void
registerActiveGui(Gui gui)
Add aGui
to the list of active GUIs.void
registerToggle(GuiToggle guiToggle)
void
registerToggles()
void
removeActiveGui(Gui gui)
Remove aGui
from the list of active GUIs.-
Methods inherited from class dev.majek.pc.mechanic.Mechanic
onPlayerJoin, onPlayerQuit, onShutdown, onStartup
-
-
-
-
Method Detail
-
registerActiveGui
public void registerActiveGui(Gui gui)
Add aGui
to the list of active GUIs.- Parameters:
gui
- The GUI to add.
-
removeActiveGui
public void removeActiveGui(Gui gui)
Remove aGui
from the list of active GUIs.- Parameters:
gui
- The GUI to remove.
-
onInventoryClick
public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)
-
onInventoryClose
public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)
-
registerToggles
public void registerToggles()
-
registerToggle
public void registerToggle(GuiToggle guiToggle)
-
-