Class AnvilGUI

java.lang.Object
net.wesjd.anvilgui.AnvilGUI

public class AnvilGUI extends Object
An anvil gui, used for gathering a user's input
Since:
1.0
Author:
Wesley Smith
  • Method Details

    • closeInventory

      public void closeInventory()
      Closes the inventory if it's open.
    • setTitle

      public void setTitle(String literalTitle, boolean preserveRenameText)
      Updates the title of the AnvilGUI to the new one.
      Parameters:
      literalTitle - The title to use as literal text
      preserveRenameText - Whether to preserve the entered rename text
      Throws:
      IllegalArgumentException - when literalTitle is null
      See Also:
    • setJsonTitle

      public void setJsonTitle(String json, boolean preserveRenameText)
      Updates the title of the AnvilGUI to the new one.
      Parameters:
      json - The json used to parse into a rich chat component
      preserveRenameText - Whether to preserve the entered rename text
      Throws:
      IllegalArgumentException - when json is null
      See Also:
    • getInventory

      public org.bukkit.inventory.Inventory getInventory()
      Returns the Bukkit inventory for this anvil gui
      Returns:
      the Inventory for this anvil gui