mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
SPIGOT-7621: Fix empty strings in item lore
By: md_5 <git@md-5.net>
This commit is contained in:
parent
6686458555
commit
86b52ff618
1 changed files with 4 additions and 3 deletions
|
@ -1643,11 +1643,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|||
addTo.add(IChatBaseComponent.empty());
|
||||
} else {
|
||||
String entry = object.toString();
|
||||
IChatBaseComponent component = (possiblyJsonInput) ? CraftChatMessage.fromJSONOrString(entry) : CraftChatMessage.fromStringOrNull(entry);
|
||||
|
||||
if (possiblyJsonInput) {
|
||||
addTo.add(CraftChatMessage.fromJSONOrString(entry));
|
||||
if (component != null) {
|
||||
addTo.add(component);
|
||||
} else {
|
||||
addTo.add(CraftChatMessage.fromStringOrNull(entry));
|
||||
addTo.add(IChatBaseComponent.empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue