Package me.hsgamer.hscore.bukkit.gui
Class BukkitGUIHolder
java.lang.Object
me.hsgamer.hscore.ui.BaseHolder<D>
me.hsgamer.hscore.minecraft.gui.GUIHolder<BukkitGUIDisplay>
me.hsgamer.hscore.bukkit.gui.BukkitGUIHolder
- All Implemented Interfaces:
me.hsgamer.hscore.ui.Holder<BukkitGUIDisplay>,me.hsgamer.hscore.ui.property.Initializable,me.hsgamer.hscore.ui.property.Updatable
The
GUIHolder for Bukkit-
Field Summary
Fields inherited from class me.hsgamer.hscore.ui.BaseHolder
displayMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseAll(List<BukkitGUIDisplay> displays) BiFunction<BukkitGUIDisplay,UUID, org.bukkit.inventory.Inventory> Get the inventory functionorg.bukkit.event.inventory.InventoryTypeGet the inventory typeorg.bukkit.plugin.PluginGet the pluginintGet the size of the inventory for the unique idGet the size functionGet the title for the unique idGet the title functionvoidinit()protected @NotNull BukkitGUIDisplaynewDisplay(UUID uuid) protected voidonDrag(org.bukkit.event.inventory.InventoryDragEvent event) Handle drag eventprotected voidonRemoveDisplay(@NotNull BukkitGUIDisplay display) voidsetInventoryFunction(BiFunction<BukkitGUIDisplay, UUID, org.bukkit.inventory.Inventory> inventoryFunction) Set the inventory functionvoidsetInventoryType(org.bukkit.event.inventory.InventoryType inventoryType) Set the inventory typevoidsetSize(int size) Set the sizevoidsetSizeFunction(ToIntFunction<UUID> sizeFunction) Set the size functionvoidSet the titlevoidsetTitleFunction(Function<UUID, String> titleFunction) Set the title functionMethods inherited from class me.hsgamer.hscore.minecraft.gui.GUIHolder
getButtonMap, getCloseFilter, isRemoveDisplayOnClose, onClick, onClose, onOpen, setButtonMap, setCloseFilter, setRemoveDisplayOnClose, stopMethods inherited from class me.hsgamer.hscore.ui.BaseHolder
addEventConsumer, clearAllEventConsumer, clearEventConsumer, createDisplay, getDisplay, handleEvent, 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
handleEvent
-
Constructor Details
-
BukkitGUIHolder
public BukkitGUIHolder(org.bukkit.plugin.Plugin plugin) Create a new holder- Parameters:
plugin- the plugin
-
-
Method Details
-
getPlugin
public org.bukkit.plugin.Plugin getPlugin()Get the plugin- Returns:
- the plugin
-
getInventoryType
public org.bukkit.event.inventory.InventoryType getInventoryType()Get the inventory type- Returns:
- the inventory type
-
setInventoryType
public void setInventoryType(org.bukkit.event.inventory.InventoryType inventoryType) Set the inventory type- Parameters:
inventoryType- the inventory type
-
getTitleFunction
Get the title function- Returns:
- the title function
-
setTitleFunction
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
Set the title- Parameters:
title- the title- See Also:
-
getSizeFunction
Get the size function- Returns:
- the size function
-
setSizeFunction
Set the size function- Parameters:
sizeFunction- the size function
-
getSize
Get the size of the inventory for the unique id- Parameters:
uuid- the unique id- Returns:
- the size
- See Also:
-
setSize
public void setSize(int size) Set the size- Parameters:
size- the size- See Also:
-
getInventoryFunction
Get the inventory function- Returns:
- the inventory function
-
setInventoryFunction
public void setInventoryFunction(BiFunction<BukkitGUIDisplay, UUID, org.bukkit.inventory.Inventory> inventoryFunction) Set the inventory function- Parameters:
inventoryFunction- the inventory function
-
newDisplay
- Specified by:
newDisplayin classme.hsgamer.hscore.ui.BaseHolder<BukkitGUIDisplay>
-
onRemoveDisplay
- Overrides:
onRemoveDisplayin classme.hsgamer.hscore.ui.BaseHolder<BukkitGUIDisplay>
-
init
public void init()- Specified by:
initin interfaceme.hsgamer.hscore.ui.property.Initializable- Overrides:
initin classGUIHolder<BukkitGUIDisplay>
-
closeAll
- Overrides:
closeAllin classGUIHolder<BukkitGUIDisplay>
-
onDrag
protected void onDrag(org.bukkit.event.inventory.InventoryDragEvent event) Handle drag event- Parameters:
event- the event
-