Class AnvilGUI
java.lang.Object
de.placeblock.betterinventories.gui.GUI
de.placeblock.betterinventories.gui.impl.AnvilGUI
- All Implemented Interfaces:
org.bukkit.event.Listener
- Direct Known Subclasses:
TextInputGUI
GUI for creating Anvil GUIs
If you want to receive Text from Anvils you should use
TextInputGUI-
Constructor Summary
ConstructorsConstructorDescriptionAnvilGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title) Creates a new AnvilGUI -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.InventoryCreates the Bukkit Inventory for this GUIintgetSlots()voidprovideItem(org.bukkit.inventory.ItemStack itemStack) Used to provide items on MOVE_TO_OTHER_INVENTORY click eventList<org.bukkit.inventory.ItemStack>Renders the GUI on a listsearchSection(int slot, boolean onlyPanes) Returns the GUISection at a specific slot.Methods inherited from class de.placeblock.betterinventories.gui.GUI
dispatchAdd, dispatchAmount, dispatchRemove, getPlayers, getView, getView, onClose, onInventoryClick, onInventoryClose, onInventoryDrag, reloadViews, render, showPlayer, update, updateViews
-
Constructor Details
-
AnvilGUI
public AnvilGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title) Creates a new AnvilGUI- Parameters:
plugin- The plugintitle- The title of the GUI
-
-
Method Details
-
createBukkitInventory
public org.bukkit.inventory.Inventory createBukkitInventory()Creates the Bukkit Inventory for this GUI- Specified by:
createBukkitInventoryin classGUI- Returns:
- The Bukkit Inventory
-
getSlots
public int getSlots() -
renderContent
Renders the GUI on a list- Specified by:
renderContentin classGUI- Returns:
- The List
-
searchSection
Returns the GUISection at a specific slot.- Specified by:
searchSectionin classGUI- Parameters:
slot- The slotonlyPanes- Whether to return only panes even if there is an item at the clicked slot- Returns:
- The GUISection at the slot or null
-
provideItem
public void provideItem(org.bukkit.inventory.ItemStack itemStack) Description copied from class:GUIUsed to provide items on MOVE_TO_OTHER_INVENTORY click event- Specified by:
provideItemin classGUI- Parameters:
itemStack- The ItemStack that is provided
-