geforkt von Mirrors/Velocity
Remove nextProtocolVersion from MinecraftConnection
ViaVersion was the only intended user. However, ViaVersion for Velocity 1.1.0 no longer uses this functionality, and so it doesn't make sense to keep it in Velocity 1.1.0.
Dieser Commit ist enthalten in:
Ursprung
e57c6d00c0
Commit
87bff1a123
@ -60,7 +60,6 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
|
|||||||
private StateRegistry state;
|
private StateRegistry state;
|
||||||
private @Nullable MinecraftSessionHandler sessionHandler;
|
private @Nullable MinecraftSessionHandler sessionHandler;
|
||||||
private ProtocolVersion protocolVersion;
|
private ProtocolVersion protocolVersion;
|
||||||
private ProtocolVersion nextProtocolVersion;
|
|
||||||
private @Nullable MinecraftConnectionAssociation association;
|
private @Nullable MinecraftConnectionAssociation association;
|
||||||
private final VelocityServer server;
|
private final VelocityServer server;
|
||||||
private ConnectionType connectionType = ConnectionTypes.UNDETERMINED;
|
private ConnectionType connectionType = ConnectionTypes.UNDETERMINED;
|
||||||
@ -333,7 +332,6 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
|
|||||||
ensureInEventLoop();
|
ensureInEventLoop();
|
||||||
|
|
||||||
this.protocolVersion = protocolVersion;
|
this.protocolVersion = protocolVersion;
|
||||||
this.nextProtocolVersion = protocolVersion;
|
|
||||||
if (protocolVersion != ProtocolVersion.LEGACY) {
|
if (protocolVersion != ProtocolVersion.LEGACY) {
|
||||||
this.channel.pipeline().get(MinecraftEncoder.class).setProtocolVersion(protocolVersion);
|
this.channel.pipeline().get(MinecraftEncoder.class).setProtocolVersion(protocolVersion);
|
||||||
this.channel.pipeline().get(MinecraftDecoder.class).setProtocolVersion(protocolVersion);
|
this.channel.pipeline().get(MinecraftDecoder.class).setProtocolVersion(protocolVersion);
|
||||||
@ -419,14 +417,6 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
|
|||||||
this.association = association;
|
this.association = association;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProtocolVersion getNextProtocolVersion() {
|
|
||||||
return this.nextProtocolVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNextProtocolVersion(ProtocolVersion nextProtocolVersion) {
|
|
||||||
this.nextProtocolVersion = nextProtocolVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the detected {@link ConnectionType}.
|
* Gets the detected {@link ConnectionType}.
|
||||||
* @return The {@link ConnectionType}
|
* @return The {@link ConnectionType}
|
||||||
|
@ -131,7 +131,7 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
|
|
||||||
// Initiate the handshake.
|
// Initiate the handshake.
|
||||||
InetSocketAddress destAddress = registeredServer.getServerInfo().getAddress();
|
InetSocketAddress destAddress = registeredServer.getServerInfo().getAddress();
|
||||||
ProtocolVersion protocolVersion = proxyPlayer.getConnection().getNextProtocolVersion();
|
ProtocolVersion protocolVersion = proxyPlayer.getConnection().getProtocolVersion();
|
||||||
Handshake handshake = new Handshake();
|
Handshake handshake = new Handshake();
|
||||||
handshake.setNextStatus(StateRegistry.LOGIN_ID);
|
handshake.setNextStatus(StateRegistry.LOGIN_ID);
|
||||||
handshake.setProtocolVersion(protocolVersion);
|
handshake.setProtocolVersion(protocolVersion);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren