Class BukkitGUIUtils

java.lang.Object
me.hsgamer.hscore.bukkit.gui.BukkitGUIUtils

public final class BukkitGUIUtils extends Object
The utility class for BukkitGUIHolder
  • Method Details

    • allowMoveItemOnBottom

      public static void allowMoveItemOnBottom(BukkitGUIHolder holder)
      Set that the holder should not cancel the click event on bottom inventory
      Parameters:
      holder - the gui holder
    • cancelDragEvent

      public static void cancelDragEvent(BukkitGUIHolder holder)
      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 for BukkitGUIDisplay
      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