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:
me.hsgamer.hscore.ui.Holder<MinestomGUIDisplay>,me.hsgamer.hscore.ui.property.Initializable,me.hsgamer.hscore.ui.property.Updatable
The
GUIHolder for Minestom-
Field Summary
Fields inherited from class me.hsgamer.hscore.ui.BaseHolder
displayMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseAll(List<MinestomGUIDisplay> displays) Get the close predicate@NotNull net.minestom.server.inventory.InventoryTypeGet the inventory type@NotNull net.kyori.adventure.text.ComponentGet the title for the unique idGet the title functionvoidinit()protected @NotNull MinestomGUIDisplaynewDisplay(UUID uuid) voidsetClosePredicate(@NotNull Predicate<@NotNull UUID> closePredicate) Set the close predicatevoidsetInventoryType(@NotNull net.minestom.server.inventory.InventoryType inventoryType) Set the inventory typevoidsetTitle(@NotNull net.kyori.adventure.text.Component title) Set the titlevoidsetTitleFunction(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, stopMethods inherited from class me.hsgamer.hscore.ui.BaseHolder
addEventConsumer, clearAllEventConsumer, clearEventConsumer, createDisplay, getDisplay, handleEvent, handleEvent, onRemoveDisplay, removeAllDisplay, removeDisplay, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.ui.Holder
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()- Specified by:
initin interfaceme.hsgamer.hscore.ui.property.Initializable- Overrides:
initin classGUIHolder<MinestomGUIDisplay>
-
newDisplay
- Specified by:
newDisplayin classme.hsgamer.hscore.ui.BaseHolder<MinestomGUIDisplay>
-
closeAll
- Overrides:
closeAllin classGUIHolder<MinestomGUIDisplay>
-