Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-06 00:00:47 +01:00
Initializing the handshake registry explicitly is redundant.
Dieser Commit ist enthalten in:
Ursprung
3c8055019e
Commit
c8e3e7ff94
@ -93,7 +93,6 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
||||
.addListener((ChannelFutureListener) future -> {
|
||||
if (future.isSuccess()) {
|
||||
connection = new MinecraftConnection(future.channel(), server);
|
||||
connection.setState(StateRegistry.HANDSHAKE);
|
||||
connection.setAssociation(VelocityServerConnection.this);
|
||||
future.channel().pipeline().addLast(HANDLER, connection);
|
||||
|
||||
|
@ -48,7 +48,6 @@ public class ServerChannelInitializer extends ChannelInitializer<Channel> {
|
||||
.addLast(MINECRAFT_ENCODER, new MinecraftEncoder(ProtocolUtils.Direction.CLIENTBOUND));
|
||||
|
||||
final MinecraftConnection connection = new MinecraftConnection(ch, this.server);
|
||||
connection.setState(StateRegistry.HANDSHAKE);
|
||||
connection.setSessionHandler(new HandshakeSessionHandler(connection, this.server));
|
||||
ch.pipeline().addLast(Connections.HANDLER, connection);
|
||||
|
||||
|
@ -78,9 +78,7 @@ public class VelocityRegisteredServer implements RegisteredServer {
|
||||
.addLast(MINECRAFT_ENCODER,
|
||||
new MinecraftEncoder(ProtocolUtils.Direction.SERVERBOUND));
|
||||
|
||||
MinecraftConnection connection = new MinecraftConnection(ch, server);
|
||||
connection.setState(StateRegistry.HANDSHAKE);
|
||||
ch.pipeline().addLast(HANDLER, connection);
|
||||
ch.pipeline().addLast(HANDLER, new MinecraftConnection(ch, server));
|
||||
}
|
||||
})
|
||||
.connect(serverInfo.getAddress())
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren