Commits

Y2Kwastaken authored and md_5 committed ecfa559ae88
#849: Add InventoryView#setTitle
No tags

src/main/java/org/bukkit/inventory/InventoryView.java

Modified
447 447 return getPlayer().setWindowProperty(prop, value);
448 448 }
449 449
450 450 /**
451 451 * Get the title of this inventory window.
452 452 *
453 453 * @return The title.
454 454 */
455 455 @NotNull
456 456 public abstract String getTitle();
457 +
458 + /**
459 + * Get the original title of this inventory window, before any changes were
460 + * made using {@link #setTitle(String)}.
461 + *
462 + * @return the original title
463 + */
464 + @NotNull
465 + public abstract String getOriginalTitle();
466 +
467 + /**
468 + * Sets the title of this inventory window to the specified title if the
469 + * inventory window supports it.
470 + * <p>
471 + * Note if the inventory does not support titles that can be changed (ie, it
472 + * is not creatable or viewed by a player), then this method will throw an
473 + * exception.
474 + *
475 + * @param title The new title.
476 + */
477 + public abstract void setTitle(@NotNull String title);
457 478 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut