mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 17:52:28 +01:00
SPIGOT-4123: Fix display names cleared by plugins / serialization
This commit is contained in:
parent
f732acf24f
commit
7357d7237a
1 changed files with 2 additions and 2 deletions
|
@ -566,7 +566,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
|
|||
}
|
||||
|
||||
public final void setDisplayName(String name) {
|
||||
this.displayName = new ChatComponentText(name);
|
||||
this.displayName = (name == null) ? null : new ChatComponentText(name);
|
||||
}
|
||||
|
||||
public boolean hasDisplayName() {
|
||||
|
@ -580,7 +580,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
|
|||
|
||||
@Override
|
||||
public void setLocalizedName(String name) {
|
||||
this.locName = new ChatComponentText(name);
|
||||
this.locName = (name == null) ? null : new ChatComponentText(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue