Package net.wesjd.anvilgui
Class AnvilGUI
java.lang.Object
net.wesjd.anvilgui.AnvilGUI
An anvil gui, used for gathering a user's input
- Since:
- 1.0
- Author:
- Wesley Smith
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for anAnvilGUIobjectstatic interfaceA handler that is called when the user clicks a slot.static classDeprecated.static interfaceAn action to run in response to a player clicking the output slot in the GUI.static classClass wrapping the magic constants of slot numbers in an anvil GUIstatic final classRepresents a snapshot of the state of an AnvilGUI -
Method Summary
Modifier and TypeMethodDescriptionvoidCloses the inventory if it's open.org.bukkit.inventory.InventoryReturns the Bukkit inventory for this anvil guivoidsetJsonTitle(String json, boolean preserveRenameText) Updates the title of the AnvilGUI to the new one.voidUpdates the title of the AnvilGUI to the new one.
-
Method Details
-
closeInventory
public void closeInventory()Closes the inventory if it's open. -
setTitle
Updates the title of the AnvilGUI to the new one.- Parameters:
literalTitle- The title to use as literal textpreserveRenameText- Whether to preserve the entered rename text- Throws:
IllegalArgumentException- when literalTitle is null- See Also:
-
setJsonTitle
Updates the title of the AnvilGUI to the new one.- Parameters:
json- The json used to parse into a rich chat componentpreserveRenameText- 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
Inventoryfor this anvil gui
-
AnvilGUI.ResponseAction