Fix online mode

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-10-26 00:44:16 +02:00
parent 23d59cb135
commit f86d91f9b8

View File

@ -235,7 +235,7 @@ public class PlayerSocketConnection extends PlayerConnection {
if (encrypted) { // Encryption support
ByteBuffer output = PacketUtils.localBuffer();
try {
this.encryptCipher.update(buffer, output);
this.encryptCipher.update(buffer.duplicate(), output);
buffer = output.flip();
} catch (ShortBufferException e) {
MinecraftServer.getExceptionManager().handleException(e);