diff --git a/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java b/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java index 36bc52e..735e8e6 100644 --- a/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java +++ b/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java @@ -37,7 +37,7 @@ public class ServerHandshakeNetworkHandlerMixin { @Inject(method = "onHandshake", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerLoginNetworkHandler;(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;)V")) private void onProcessHandshakeStart(HandshakeC2SPacket packet, CallbackInfo ci) { - if (packet.getIntendedState().equals(NetworkState.LOGIN)) { + if (NetworkState.LOGIN.equals(packet.getNewNetworkState())) { String[] split = ((HandshakeC2SPacketAccessor) packet).getAddress().split("\00"); if (split.length == 3 || split.length == 4) { // override/insert forwarded IP into connection: