Fix Offline BungeeCord 1.5.2 requiring encryption

Vanilla minecraft encryption can be unofficially bypassed on pre-1.7
minecraft when connecting to offline-mode servers (now it IS officially
bypassed in offline mode in 1.7+), but BungeeCord 1.5.2 requires
encryption even in offline-mode, so enable encryption even in
offline-mode. Bug report by xp9kus.
This commit is contained in:
ORelio 2015-07-23 21:38:58 +02:00
parent 1e801ad415
commit c88d150976

View file

@ -441,15 +441,11 @@ namespace MinecraftClient.Protocol.Handlers
byte[] token = readNextByteArray();
if (serverID == "-")
{
ConsoleIO.WriteLineFormatted("§8Server is in offline mode.");
return true; //No need to check session or start encryption
}
else
{
ConsoleIO.WriteLineFormatted("§8Handshake successful. (Server ID: " + serverID + ')');
return StartEncryption(uuid, username, sessionID, token, serverID, PublicServerkey);
}
return StartEncryption(uuid, username, sessionID, token, serverID, PublicServerkey);
}
else return false;
}