SPIGOT-4722: Cannot get title of player's inventory

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-24 10:23:12 +10:00
parent db7e2f9830
commit 7e5fc5e1ba
2 changed files with 6 additions and 5 deletions

View File

@@ -34,11 +34,11 @@
+ ((CraftInventory) destination.getBottomInventory()).getInventory().onOpen(player);
+ }
+ private IChatBaseComponent title;
+ public IChatBaseComponent getTitle() {
+ public final IChatBaseComponent getTitle() {
+ Preconditions.checkState(this.title != null, "Title not set");
+ return this.title;
+ }
+ public void setTitle(IChatBaseComponent title) {
+ public final void setTitle(IChatBaseComponent title) {
+ Preconditions.checkState(this.title == null, "Title already set");
+ this.title = title;
+ }