Open Andre601 opened 1 month ago
Doesn't this limit the "hover messages" you can generate? Or is this a check imposed by the Minecraft client? 16 characters does not sound like much so I'm pretty sure this used to work just fine.
From what I understand by the paper devs does the codec used by mojang not really support too long names, causing issues in various places (not necessarely the players in the server list hover), so Paper just now enforces a limit to avoid these issues in general...
And yes, this did work fine before from personal experience, but that's how it sadly is right now, at least with paper.
There is a small workaround right now that could (probably) relatively easy be implemented into SLP, which is to make a class implementing PlayerProfile
where the length check isn't present and use that for the hover text.
The only important values are the name and UUID here, with everything else having no real use.
It's annoying to add, but it does work.
Paper made some changes regarding creating player profiles (
Bukkit.createProfile(...)
).Namely, any name that is longer than 16 characters will now throw an IllegalArgumentException. Proof: https://codeberg.org/Andre601/AdvancedServerList/issues/282
Possible place where this error can appear: https://github.com/Minecrell/ServerListPlus/blob/b9ab80c98bec582c07ac0423c94e02990f6f214f/Bukkit/src/main/java/net/minecrell/serverlistplus/bukkit/handlers/PaperEventHandler.java#L113
So, unless this is outside the "maintenance-only" scope of this plugin, should it be considered to add a safety-check to truncate the line...
From what I gathered on the PaperMC discord is this check not (yet) in Velocity nor Waterfall, but it probably should be added for consistency-sake.