geforkt von Mirrors/Paper
Fix equality of deserialized display names
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
d195996997
Commit
42b7bb16d3
@ -449,7 +449,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CraftMetaItem(Map<String, Object> map) {
|
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));
|
itemName = CraftChatMessage.fromJSONOrNull(SerializableMeta.getString(map, ITEM_NAME.BUKKIT, true));
|
||||||
|
|
||||||
Iterable<?> lore = SerializableMeta.getObject(Iterable.class, map, LORE.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);
|
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 (message == null) message = "";
|
||||||
if (nullable && message.isEmpty()) return null;
|
if (nullable && message.isEmpty()) return null;
|
||||||
IChatBaseComponent component = fromJSONOrNull(message);
|
IChatBaseComponent component = fromJSONOrNull(message);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren