13
0
geforkt von Mirrors/Velocity

Initializing the handshake registry explicitly is redundant.

Dieser Commit ist enthalten in:
Andrew Steinborn 2019-02-20 21:19:04 -05:00
Ursprung 3c8055019e
Commit c8e3e7ff94
3 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -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);

Datei anzeigen

@ -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);

Datei anzeigen

@ -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())