Prepare paper for microsoft nick names

Hi everyone! As we everyone know, mojang is starting to migrate its accounts to microsoft, which allow players/users however you want to say it, have spaces in their nicknames.

NOTE: GeyserMC doesn’t helps, as in bedrock edition, you can also use name with spaces, and for the ones how don’t know, GeyserMC allows bedrock, ps4 and other platforms minecraft users, to join java edition servers

This is causing a lot of issues for plugins, as this was not completely expected. My idea is to paper try to fix that, modifying the client name before he joins, replacing any space or blank character, with a “_”, invisible in game, but visible in code, so when you kick for example a player called “I have space”, runing “I_have_space” so it would do the trick

Are you sure that minecraft java edition accounts created thru a microsoft account can contain spaces?
Preeeeetttty sure that’s not the case, so we should be fine.
In fact, since microsoft accounts have been a thing for half a year now, I would say we would have noticed by now if there was an issue here

Too many plugins have assumptions that there are no spaces, same with many commands.
If mojang allows spaces in names for java, we’ll have to address that, but, we’re not going to allow invalid names as that presents a security risk to support something mojang doesn’t support
(Pretty sure the validation code in Paper IS mojangs, automagically mangling names is a nogo, if Geyser has issues, it’s on them to address it. We may be able to help them in terms of support, but, we’re not gonna allow invalid names on the server)

Then why are users ( I’m a plugin developer ) reporting that some players are joining their servers, and they have spaces in ther nick names?

Get a uuid from your users and then we can check with the mojang api

Well, it’s not possible as the server is running offline mode, that’s what I meant.

Offline servers have this problem. I know, it’s not a paper/mojang issue. It’s fault of the server owner for running offline mode. But seeing paper doing something at respect for offline mode servers would be great

sounds like some validation is missing somewhere

We’re not gonna intentionally allow spaces in names, they’re broken and break plugins, unless mojang makes it official, we’re not gonna support this broken behavior

We don’t support piracy. Never did, never will. Offline mode is only supported for actual offline usage (or as part of a proxy setup)

I completely understand.

But is there a work around that I could do?
Like creating a plugin that listens to login packet and check nickname or some weird stuff ( I don’t really like packet listening )?