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) Function<BukkitGUIDisplay,org.bukkit.inventory.Inventory> Get the inventory functionorg.bukkit.event.inventory.InventoryTypeGet the inventory typeorg.bukkit.plugin.PluginGet the pluginintgetSize()Get the size of the inventoryvoidinit()protected @NotNull BukkitGUIDisplaynewDisplay(UUID uuid) protected voidonDrag(BukkitDragEvent event) Handle drag eventvoidsetInventoryFunction(Function<BukkitGUIDisplay, org.bukkit.inventory.Inventory> inventoryFunction) Set the inventory functionvoidsetInventoryType(org.bukkit.event.inventory.InventoryType inventoryType) Set the inventory typevoidsetSize(int size) Set the sizevoidSet the titlevoidsetTitleFunction(Function<UUID, String> 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, 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
handleEvent, update
-
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
-
getSize
public int getSize()Get the size of the inventory- Returns:
- the size
-
setSize
public void setSize(int size) Set the size- Parameters:
size- the size
-
getInventoryFunction
Get the inventory function- Returns:
- the inventory function
-
setInventoryFunction
public void setInventoryFunction(Function<BukkitGUIDisplay, org.bukkit.inventory.Inventory> inventoryFunction) Set the inventory function- Parameters:
inventoryFunction- the inventory function
-
setTitleFunction
Set the title function- Parameters:
titleFunction- the title function
-
setTitle
Set the title- Parameters:
title- the title- See Also:
-
newDisplay
- Specified by:
newDisplayin 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
Handle drag event- Parameters:
event- the event
-