Chat heads doesn't seems to work with accents
mortebrume opened this issue · 3 comments
Hi !
On my multiplayer server, some people use nicknames with accents, and chat head doesn't seems to work with this, strangely.
The server doesn't send UUIDs so this is based on the heuristic detection of chatheads. I tried to use name aliases as a temporary solution, but this doesn't work (and I confirmed that the name aliases are working if I'm using a nickname without accents).
I will give you some screens, there's nothing in the logs sadly, so I cannot pinpoint the issue.
(we are using a custom chat plugin, perhaps we could try to modify the plugin so that it could send the real UUIDs so chat heads doesn't have to use heuristic detection ?)
Thank you !
Ah yeah, accents are filtered out since they are not allowed inside profile names and the fallback heuristic is pretty stupid. It simply compares every "word" in the message with each profile or display name, where a "word" contains only alphanumeric & _
characters, so it'd check for the name "Morg" and the name "n" instead of "Morgán".
It's the same as with spaces in the names, I really need to rewrite the display name matching...
we are using a custom chat plugin, perhaps we could try to modify the plugin so that it could send the real UUIDs so chat heads doesn't have to use heuristic detection ?
It would be enough if you add a click event with an appropriate /tell
command (ideally inside the sender decoration) - you know the one where you can DM a player by clicking on their name in chat? That's the first heuristic Chat Heads uses and by far the best, as it uses the player's profile name.
(Plus it's convenient for your players as well.)
I uploaded a (completely untested) test version for Fabric 1.20.5/6, which should have this fixed if you wanna try it out.
Test version was broken, got everything tested and fixed. Currently doing backports.