Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Disconnect client if using an invalid Mojang account (#975)
This commit supresses the NPE that was previously sent when using an invalid Mojang account. Instead, the Bedrock client is disconnected with an error message.
Dieser Commit ist enthalten in:
Ursprung
64d5390800
Commit
221e5bd103
@ -350,6 +350,11 @@ public class GeyserSession implements CommandSender {
|
||||
public void connected(ConnectedEvent event) {
|
||||
loggingIn = false;
|
||||
loggedIn = true;
|
||||
if (protocol.getProfile() == null) {
|
||||
// Java account is offline
|
||||
disconnect(LanguageUtils.getPlayerLocaleString("geyser.network.remote.invalid_account", clientData.getLanguageCode()));
|
||||
return;
|
||||
}
|
||||
connector.getLogger().info(LanguageUtils.getLocaleStringLog("geyser.network.remote.connect", authData.getName(), protocol.getProfile().getName(), remoteServer.getAddress()));
|
||||
playerEntity.setUuid(protocol.getProfile().getId());
|
||||
playerEntity.setUsername(protocol.getProfile().getName());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren