#849: Add InventoryView#setTitle

By: Y2Kwastaken <mwholder2005@gmail.com>
This commit is contained in:
Bukkit/Spigot 2023-05-04 18:52:15 +10:00
parent 7f981d0d2d
commit 101494af90

View file

@ -454,4 +454,25 @@ public abstract class InventoryView {
*/
@NotNull
public abstract String getTitle();
/**
* Get the original title of this inventory window, before any changes were
* made using {@link #setTitle(String)}.
*
* @return the original title
*/
@NotNull
public abstract String getOriginalTitle();
/**
* Sets the title of this inventory window to the specified title if the
* inventory window supports it.
* <p>
* Note if the inventory does not support titles that can be changed (ie, it
* is not creatable or viewed by a player), then this method will throw an
* exception.
*
* @param title The new title.
*/
public abstract void setTitle(@NotNull String title);
}