mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
#849: Add InventoryView#setTitle
By: Y2Kwastaken <mwholder2005@gmail.com>
This commit is contained in:
parent
7f981d0d2d
commit
101494af90
1 changed files with 21 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue