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

public class AnvilGUI extends GUI
GUI for creating Anvil GUIs If you want to receive Text from Anvils you should use TextInputGUI
  • Constructor Details

    • AnvilGUI

      public AnvilGUI(org.bukkit.plugin.Plugin plugin, net.kyori.adventure.text.TextComponent title)
      Creates a new AnvilGUI
      Parameters:
      plugin - The plugin
      title - The title of the GUI
  • Method Details

    • createBukkitInventory

      public org.bukkit.inventory.Inventory createBukkitInventory()
      Creates the Bukkit Inventory for this GUI
      Specified by:
      createBukkitInventory in class GUI
      Returns:
      The Bukkit Inventory
    • getSlots

      public int getSlots()
      Specified by:
      getSlots in class GUI
      Returns:
      The amount of slots this GUI has
    • renderContent

      public List<org.bukkit.inventory.ItemStack> renderContent()
      Renders the GUI on a list
      Specified by:
      renderContent in class GUI
      Returns:
      The List
    • searchSection

      public GUISection.SearchData searchSection(int slot, boolean onlyPanes)
      Returns the GUISection at a specific slot.
      Specified by:
      searchSection in class GUI
      Parameters:
      slot - The slot
      onlyPanes - 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: GUI
      Used to provide items on MOVE_TO_OTHER_INVENTORY click event
      Specified by:
      provideItem in class GUI
      Parameters:
      itemStack - The ItemStack that is provided