ServerListPlus icon indicating copy to clipboard operation
ServerListPlus copied to clipboard

Possible hover issues with latest paper builds

Open Andre601 opened this issue 1 year ago • 3 comments

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.

Andre601 avatar May 10 '24 18:05 Andre601

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.

stephan-gh avatar May 11 '24 18:05 stephan-gh

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.

Andre601 avatar May 11 '24 18:05 Andre601

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.

Andre601 avatar May 13 '24 19:05 Andre601