Open LoneDev6 opened 6 months ago
This doesn't lose any data, so the issue is probably caused by the "value" tag, I think. The issue might be caused by the fact that some plugins are sending legacy hover events data and for some reason Adventure is discarding them.
{
"extra": [
{ "color": "gold", "text": "LoneDev's item is " },
{ "color": "gold", "text": "" },
{ "color": "gold", "text": "" },
{
"color": "white",
"hoverEvent": {
"action": "show_item",
"contents": { "id": "minecraft:wooden_axe", "tag": "{Damage:10}" }
},
"text": "Wooden Axe x1"
}
],
"text": ""
}
What happens when you enable validating strict events, rather than telling the serializer to silently discard any useful information for this issue
(also you seem to have done part of your process incorrectly inserting legacy characters in your components, we'd recommend fixing that to avoid inconsistent styling)
Thanks! I'd expect the adventure API to allow legacy components as the client shows these messages correctly even on modern versions. I am not the author of the other plugin so I have no control over their malformed JSON, but the client accepts it so I guess adventure should also do that.
Let me know what you think, thanks.
mojang says to not use it, as such adventure doesn't support (and in some cases even block) legacy formatting characters https://bugs.mojang.com/browse/MC-190605?focusedId=993040#comment-993040
It's not about §
legacy colors, it's about the legacy way to create hover events.
I edited the message to avoid confusion: https://github.com/KyoriPowered/adventure/issues/1025#issuecomment-1876881599
For some reason serializes lose
hoverEvent
between Json -> Component conversions and vice versa.Server version: 1.19.4.
Current: git-Purpur-1985 (MC: 1.19.4)
My code:
Second attempt specifying legacy hover serializer (same result).
This component was obtained from another plugin called ChatControlRed.
Before
After