Waterfall/Waterfall-Proxy-Patches/0016-Change-state-to-encrypt-only-if-onlineMode-is-true.patch
2020-12-16 18:30:39 +08:00

28 lines
1.1 KiB
Diff

From 1fa924e0e980d172556ff43ee97caee5211c53a0 Mon Sep 17 00:00:00 2001
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
Date: Wed, 16 Dec 2020 18:25:03 +0800
Subject: [PATCH] Change state to encrypt only if onlineMode is true
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index 1be9ae77..93486904 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -452,11 +452,12 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( onlineMode )
{
unsafe().sendPacket( request = EncryptionUtil.encryptRequest() );
+ // FlameCord - Change state to encrypt only if onlineMode is true
+ thisState = State.ENCRYPT;
} else
{
finish();
}
- thisState = State.ENCRYPT;
}
};
--
2.20.1