mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Always replace spaces in usernames when using Floodgate
Bungeecord recently started checking usernames for spaces in the login start packet. To resolve this we just always send the username without spaces in the login start packet. Floodgate is still able to get the real username of the Bedrock player and Floodgate is also still in charge of the final username.
This commit is contained in:
parent
934fc12b16
commit
360e2f4b9a
1 changed files with 8 additions and 1 deletions
|
@ -581,7 +581,14 @@ public class GeyserSession implements CommandSender {
|
|||
|
||||
protocol = new MinecraftProtocol(authenticationService.getSelectedProfile(), authenticationService.getAccessToken());
|
||||
} else {
|
||||
protocol = new MinecraftProtocol(username);
|
||||
// always replace spaces when using Floodgate,
|
||||
// as usernames with spaces cause issues with Bungeecord's login cycle
|
||||
String validUsername = username;
|
||||
if (remoteAuthType == AuthType.FLOODGATE) {
|
||||
validUsername = username.replace(' ', '_');
|
||||
}
|
||||
|
||||
protocol = new MinecraftProtocol(validUsername);
|
||||
}
|
||||
|
||||
connectDownstream();
|
||||
|
|
Loading…
Reference in a new issue