Package me.hsgamer.hscore.minestom.gui
Class MinestomGUIHolder
java.lang.Object
me.hsgamer.hscore.ui.BaseHolder<D>
me.hsgamer.hscore.minecraft.gui.GUIHolder<MinestomGUIDisplay>
me.hsgamer.hscore.minestom.gui.MinestomGUIHolder
- All Implemented Interfaces:
Holder<MinestomGUIDisplay>
,Initializable
,Updatable
The
GUIHolder
for Minestom-
Field Summary
Fields inherited from class me.hsgamer.hscore.ui.BaseHolder
displayMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
closeAll
(List<MinestomGUIDisplay> displays) Close all displaysGet the close predicate@NotNull net.minestom.server.inventory.InventoryType
Get the inventory type@NotNull net.kyori.adventure.text.Component
Get the title for the unique idGet the title functionvoid
init()
Initialize some properties for the objectprotected @NotNull MinestomGUIDisplay
newDisplay
(UUID uuid) Make a new displayvoid
setClosePredicate
(@NotNull Predicate<@NotNull UUID> closePredicate) Set the close predicatevoid
setInventoryType
(@NotNull net.minestom.server.inventory.InventoryType inventoryType) Set the inventory typevoid
setTitle
(@NotNull net.kyori.adventure.text.Component title) Set the titlevoid
setTitleFunction
(Function<@NotNull UUID, @NotNull net.kyori.adventure.text.Component> titleFunction) Set the title functionMethods inherited from class me.hsgamer.hscore.minecraft.gui.GUIHolder
getButtonMap, onClick, onClose, onOpen, setButtonMap, stop
Methods inherited from class me.hsgamer.hscore.ui.BaseHolder
addEventConsumer, clearAllEventConsumer, clearEventConsumer, createDisplay, getDisplay, handleEvent, handleEvent, onRemoveDisplay, removeAllDisplay, removeDisplay, update
-
Constructor Details
-
MinestomGUIHolder
public MinestomGUIHolder()
-
-
Method Details
-
getInventoryType
@NotNull public @NotNull net.minestom.server.inventory.InventoryType getInventoryType()Get the inventory type- Returns:
- the inventory type
-
setInventoryType
public void setInventoryType(@NotNull @NotNull net.minestom.server.inventory.InventoryType inventoryType) Set the inventory type- Parameters:
inventoryType
- the inventory type
-
getTitleFunction
@NotNull public @NotNull Function<@NotNull UUID,@NotNull net.kyori.adventure.text.Component> getTitleFunction()Get the title function- Returns:
- the title function
-
setTitleFunction
public void setTitleFunction(Function<@NotNull UUID, @NotNull net.kyori.adventure.text.Component> titleFunction) Set the title function- Parameters:
titleFunction
- the title function
-
getTitle
Get the title for the unique id- Parameters:
uuid
- the unique id- Returns:
- the title
- See Also:
-
setTitle
public void setTitle(@NotNull @NotNull net.kyori.adventure.text.Component title) Set the title- Parameters:
title
- the title- See Also:
-
getClosePredicate
Get the close predicate- Returns:
- the close predicate
-
setClosePredicate
Set the close predicate- Parameters:
closePredicate
- the close predicate
-
init
public void init()Description copied from interface:Initializable
Initialize some properties for the object- Specified by:
init
in interfaceInitializable
- Overrides:
init
in classGUIHolder<MinestomGUIDisplay>
-
newDisplay
Description copied from class:BaseHolder
Make a new display- Specified by:
newDisplay
in classBaseHolder<MinestomGUIDisplay>
- Parameters:
uuid
- the unique id- Returns:
- the display
-
closeAll
Description copied from class:GUIHolder
Close all displays- Overrides:
closeAll
in classGUIHolder<MinestomGUIDisplay>
- Parameters:
displays
- the list of closed displays to be closed
-