Package me.hsgamer.hscore.minecraft.gui
Class GUIHolder<D extends GUIDisplay<?>>
java.lang.Object
me.hsgamer.hscore.ui.BaseHolder<D>
me.hsgamer.hscore.minecraft.gui.GUIHolder<D>
- All Implemented Interfaces:
Holder<D>
,Initializable
,Updatable
- Direct Known Subclasses:
BukkitGUIHolder
,MinestomGUIHolder
The base
Holder
for UI in Minecraft-
Field Summary
Fields inherited from class me.hsgamer.hscore.ui.BaseHolder
displayMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Close all displays@NotNull ButtonMap
Get the button mapvoid
init()
Initialize some properties for the objectprotected void
onClick
(@NotNull ClickEvent event) Handle click eventprotected void
onClose
(@NotNull CloseEvent event) Handle close eventprotected void
Handle open eventvoid
setButtonMap
(@NotNull ButtonMap buttonMap) Set the button mapvoid
stop()
Stop the objectMethods inherited from class me.hsgamer.hscore.ui.BaseHolder
addEventConsumer, clearAllEventConsumer, clearEventConsumer, createDisplay, getDisplay, handleEvent, handleEvent, newDisplay, onRemoveDisplay, removeAllDisplay, removeDisplay, update
-
Constructor Details
-
GUIHolder
public GUIHolder()
-
-
Method Details
-
getButtonMap
Get the button map- Returns:
- the button map
-
setButtonMap
Set the button map- Parameters:
buttonMap
- the button map
-
init
public void init()Description copied from interface:Initializable
Initialize some properties for the object -
stop
public void stop()Description copied from interface:Initializable
Stop the object- Specified by:
stop
in interfaceInitializable
- Overrides:
stop
in classBaseHolder<D extends GUIDisplay<?>>
-
onOpen
Handle open event- Parameters:
event
- the event
-
onClick
Handle click event- Parameters:
event
- the event
-
onClose
Handle close event- Parameters:
event
- the event
-
closeAll
Close all displays- Parameters:
displays
- the list of closed displays to be closed
-