Class CanvasGUI


public class CanvasGUI extends BaseCanvasGUI<SimpleGUIPane>
Used for creating GUIs that only have one canvas e.g. HopperGUIs and a fixed size. Bear in mind that for creating Chest Inventories you should use ChestGUI
  • Constructor Details

    • CanvasGUI

      protected CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, int height, boolean removeItems)
      Creates a new CanvasGUI
      Parameters:
      plugin - The plugin
      title - The title of the GUI
      height - The height of the GUI
      removeItems - Whether to remove loose items on close. The first player that closes the gui gets the items
    • CanvasGUI

      protected CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, boolean removeItems)
      Creates a new CanvasGUI
      Parameters:
      plugin - The plugin
      title - The title of the GUI
      type - The type of the GUI
      removeItems - Whether to remove loose items on close. The first player that closes the gui gets the items