diff options
author | md_5 <git@md-5.net> | 2018-07-23 10:48:28 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-23 10:48:28 +1000 |
commit | d4297cbe2d76f6dcd58f00d60de2fd312dedb762 (patch) | |
tree | 6424d0722ad73715b550bf2dd58d015e7269be74 /src/main | |
parent | 11542134c810ee3f2daadbcad246fac033746a87 (diff) | |
download | craftbukkit-d4297cbe2d76f6dcd58f00d60de2fd312dedb762.tar craftbukkit-d4297cbe2d76f6dcd58f00d60de2fd312dedb762.tar.gz craftbukkit-d4297cbe2d76f6dcd58f00d60de2fd312dedb762.tar.lz craftbukkit-d4297cbe2d76f6dcd58f00d60de2fd312dedb762.tar.xz craftbukkit-d4297cbe2d76f6dcd58f00d60de2fd312dedb762.zip |
Just throw section signs into components a la Mojang
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index 891e7c33..ff7ec7e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -49,6 +49,7 @@ import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; +import net.minecraft.server.ChatComponentText; import net.minecraft.server.NBTCompressedStreamTools; import org.apache.commons.codec.binary.Base64; @@ -565,7 +566,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } public final void setDisplayName(String name) { - this.displayName = CraftChatMessage.fromStringOrNull(name); + this.displayName = new ChatComponentText(name); } public boolean hasDisplayName() { @@ -579,7 +580,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @Override public void setLocalizedName(String name) { - this.locName = CraftChatMessage.fromStringOrNull(name); + this.locName = new ChatComponentText(name); } @Override |