diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java index f6de660ee..c3212d09e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java @@ -60,7 +60,6 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter { private StateRegistry state; private @Nullable MinecraftSessionHandler sessionHandler; private ProtocolVersion protocolVersion; - private ProtocolVersion nextProtocolVersion; private @Nullable MinecraftConnectionAssociation association; private final VelocityServer server; private ConnectionType connectionType = ConnectionTypes.UNDETERMINED; @@ -333,7 +332,6 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter { ensureInEventLoop(); this.protocolVersion = protocolVersion; - this.nextProtocolVersion = protocolVersion; if (protocolVersion != ProtocolVersion.LEGACY) { this.channel.pipeline().get(MinecraftEncoder.class).setProtocolVersion(protocolVersion); this.channel.pipeline().get(MinecraftDecoder.class).setProtocolVersion(protocolVersion); @@ -419,14 +417,6 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter { this.association = association; } - public ProtocolVersion getNextProtocolVersion() { - return this.nextProtocolVersion; - } - - public void setNextProtocolVersion(ProtocolVersion nextProtocolVersion) { - this.nextProtocolVersion = nextProtocolVersion; - } - /** * Gets the detected {@link ConnectionType}. * @return The {@link ConnectionType} diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java index e2aaf7f74..fe1144157 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java @@ -131,7 +131,7 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation, // Initiate the handshake. InetSocketAddress destAddress = registeredServer.getServerInfo().getAddress(); - ProtocolVersion protocolVersion = proxyPlayer.getConnection().getNextProtocolVersion(); + ProtocolVersion protocolVersion = proxyPlayer.getConnection().getProtocolVersion(); Handshake handshake = new Handshake(); handshake.setNextStatus(StateRegistry.LOGIN_ID); handshake.setProtocolVersion(protocolVersion);