Class BukkitGUIHolder

All Implemented Interfaces:
Holder<BukkitGUIDisplay>, Initializable, Updatable

public class BukkitGUIHolder extends GUIHolder<BukkitGUIDisplay>
The GUIHolder for Bukkit
  • 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

      public Function<BukkitGUIDisplay,org.bukkit.inventory.Inventory> 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

      public void setTitleFunction(Function<UUID,String> titleFunction)
      Set the title function
      Parameters:
      titleFunction - the title function
    • setTitle

      public void setTitle(String title)
      Set the title
      Parameters:
      title - the title
      See Also:
    • newDisplay

      @NotNull protected @NotNull BukkitGUIDisplay newDisplay(UUID uuid)
      Description copied from class: BaseHolder
      Make a new display
      Specified by:
      newDisplay in class BaseHolder<BukkitGUIDisplay>
      Parameters:
      uuid - the unique id
      Returns:
      the display
    • init

      public void init()
      Description copied from interface: Initializable
      Initialize some properties for the object
      Specified by:
      init in interface Initializable
      Overrides:
      init in class GUIHolder<BukkitGUIDisplay>
    • closeAll

      protected void closeAll(List<BukkitGUIDisplay> displays)
      Description copied from class: GUIHolder
      Close all displays
      Overrides:
      closeAll in class GUIHolder<BukkitGUIDisplay>
      Parameters:
      displays - the list of closed displays to be closed
    • onDrag

      protected void onDrag(BukkitDragEvent event)
      Handle drag event
      Parameters:
      event - the event