mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Fix equality of deserialized display names
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d195996997
commit
42b7bb16d3
2 changed files with 2 additions and 2 deletions
|
@ -449,7 +449,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|||
}
|
||||
|
||||
CraftMetaItem(Map<String, Object> map) {
|
||||
displayName = CraftChatMessage.fromJSONOrString(SerializableMeta.getString(map, NAME.BUKKIT, true));
|
||||
displayName = CraftChatMessage.fromJSONOrString(SerializableMeta.getString(map, NAME.BUKKIT, true), true, false);
|
||||
itemName = CraftChatMessage.fromJSONOrNull(SerializableMeta.getString(map, ITEM_NAME.BUKKIT, true));
|
||||
|
||||
Iterable<?> lore = SerializableMeta.getObject(Iterable.class, map, LORE.BUKKIT, true);
|
||||
|
|
|
@ -221,7 +221,7 @@ public final class CraftChatMessage {
|
|||
return fromJSONOrString(message, false, keepNewlines);
|
||||
}
|
||||
|
||||
private static IChatBaseComponent fromJSONOrString(String message, boolean nullable, boolean keepNewlines) {
|
||||
public static IChatBaseComponent fromJSONOrString(String message, boolean nullable, boolean keepNewlines) {
|
||||
if (message == null) message = "";
|
||||
if (nullable && message.isEmpty()) return null;
|
||||
IChatBaseComponent component = fromJSONOrNull(message);
|
||||
|
|
Loading…
Reference in a new issue