Package me.hsgamer.hscore.bukkit.gui
Class BukkitGUIUtils
java.lang.Object
me.hsgamer.hscore.bukkit.gui.BukkitGUIUtils
The utility class for
BukkitGUIHolder
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
allowMoveItemOnBottom
(BukkitGUIHolder holder) Set that the holder should not cancel the click event on bottom inventorystatic void
cancelDragEvent
(BukkitGUIHolder holder) Set that the holder cancels drag event on top inventorystatic Function<BukkitGUIDisplay,
org.bukkit.inventory.Inventory> Get the default inventory function forBukkitGUIDisplay
static Function<BukkitGUIDisplay,
org.bukkit.inventory.Inventory> getInventoryFunctionFromTitle
(Function<UUID, String> titleFunction) Get the inventory function from the title functionstatic int
normalizeToChestSize
(int size) Normalize the size to a valid chest size
-
Method Details
-
allowMoveItemOnBottom
Set that the holder should not cancel the click event on bottom inventory- Parameters:
holder
- the gui holder
-
cancelDragEvent
Set that the holder cancels drag event on top inventory- Parameters:
holder
- the gui holder
-
normalizeToChestSize
public static int normalizeToChestSize(int size) Normalize the size to a valid chest size- Parameters:
size
- the size- Returns:
- the normalized size
-
getDefaultInventoryFunction
public static Function<BukkitGUIDisplay,org.bukkit.inventory.Inventory> getDefaultInventoryFunction()Get the default inventory function forBukkitGUIDisplay
- Returns:
- the default inventory function
-
getInventoryFunctionFromTitle
public static Function<BukkitGUIDisplay,org.bukkit.inventory.Inventory> getInventoryFunctionFromTitle(Function<UUID, String> titleFunction) Get the inventory function from the title function- Parameters:
titleFunction
- the title function- Returns:
- the inventory function
-