Class CanvasGUI
java.lang.Object
de.placeblock.betterinventories.gui.GUI
de.placeblock.betterinventories.gui.impl.BaseCanvasGUI<SimpleGUIPane>
de.placeblock.betterinventories.gui.impl.CanvasGUI
- All Implemented Interfaces:
org.bukkit.event.Listener
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
Builder:
ChestGUI
Builder:
CanvasGUIBuilder-
Field Summary
Fields inherited from class de.placeblock.betterinventories.gui.impl.BaseCanvasGUI
canvas -
Constructor Summary
ConstructorsModifierConstructorDescriptionCanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, int height) Creates a new CanvasGUICanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, int height, boolean registerDefaultHandlers) Creates a new CanvasGUICanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type) Creates a new CanvasGUICanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, boolean registerDefaultHandlers) Creates a new CanvasGUIprotectedCanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, Vector2d size) Creates a new CanvasGUIprotectedCanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, Vector2d size, boolean registerDefaultHandlers) Creates a new CanvasGUI -
Method Summary
Methods inherited from class de.placeblock.betterinventories.gui.impl.BaseCanvasGUI
createBukkitInventory, getCanvas, getClickedSection, getSize, getSlots, renderContent, setCanvasMethods inherited from class de.placeblock.betterinventories.gui.GUI
getPlayers, getView, onClose, onInventoryClick, onInventoryClose, onInventoryDrag, registerInteractionHandler, reloadViews, render, showPlayer, unregisterInteractionHandler, update, updateViews
-
Constructor Details
-
CanvasGUI
public CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, int height) Creates a new CanvasGUI- Parameters:
plugin- The plugintitle- The title of the GUIheight- The height of the GUI
-
CanvasGUI
public CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, int height, boolean registerDefaultHandlers) Creates a new CanvasGUI- Parameters:
plugin- The plugintitle- The title of the GUIheight- The height of the GUIregisterDefaultHandlers- Whether to register default-handlers
-
CanvasGUI
public CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type) Creates a new CanvasGUI- Parameters:
plugin- The plugintitle- The title of the GUItype- The type of the GUI
-
CanvasGUI
public CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, boolean registerDefaultHandlers) Creates a new CanvasGUI- Parameters:
plugin- The plugintitle- The title of the GUItype- The type of the GUIregisterDefaultHandlers- Whether to register default-handlers
-
CanvasGUI
protected CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, Vector2d size) Creates a new CanvasGUI- Parameters:
plugin- The plugintitle- The title of the GUItype- The type of the GUIsize- The size of the GUI
-
CanvasGUI
protected CanvasGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title, org.bukkit.event.inventory.InventoryType type, Vector2d size, boolean registerDefaultHandlers) Creates a new CanvasGUI- Parameters:
plugin- The plugintitle- The title of the GUItype- The type of the GUIsize- The size of the GUIregisterDefaultHandlers- Whether to register default-handlers
-