geforkt von Mirrors/Velocity
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 -> {
|
.addListener((ChannelFutureListener) future -> {
|
||||||
if (future.isSuccess()) {
|
if (future.isSuccess()) {
|
||||||
connection = new MinecraftConnection(future.channel(), server);
|
connection = new MinecraftConnection(future.channel(), server);
|
||||||
connection.setState(StateRegistry.HANDSHAKE);
|
|
||||||
connection.setAssociation(VelocityServerConnection.this);
|
connection.setAssociation(VelocityServerConnection.this);
|
||||||
future.channel().pipeline().addLast(HANDLER, connection);
|
future.channel().pipeline().addLast(HANDLER, connection);
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ public class ServerChannelInitializer extends ChannelInitializer<Channel> {
|
|||||||
.addLast(MINECRAFT_ENCODER, new MinecraftEncoder(ProtocolUtils.Direction.CLIENTBOUND));
|
.addLast(MINECRAFT_ENCODER, new MinecraftEncoder(ProtocolUtils.Direction.CLIENTBOUND));
|
||||||
|
|
||||||
final MinecraftConnection connection = new MinecraftConnection(ch, this.server);
|
final MinecraftConnection connection = new MinecraftConnection(ch, this.server);
|
||||||
connection.setState(StateRegistry.HANDSHAKE);
|
|
||||||
connection.setSessionHandler(new HandshakeSessionHandler(connection, this.server));
|
connection.setSessionHandler(new HandshakeSessionHandler(connection, this.server));
|
||||||
ch.pipeline().addLast(Connections.HANDLER, connection);
|
ch.pipeline().addLast(Connections.HANDLER, connection);
|
||||||
|
|
||||||
|
@ -78,9 +78,7 @@ public class VelocityRegisteredServer implements RegisteredServer {
|
|||||||
.addLast(MINECRAFT_ENCODER,
|
.addLast(MINECRAFT_ENCODER,
|
||||||
new MinecraftEncoder(ProtocolUtils.Direction.SERVERBOUND));
|
new MinecraftEncoder(ProtocolUtils.Direction.SERVERBOUND));
|
||||||
|
|
||||||
MinecraftConnection connection = new MinecraftConnection(ch, server);
|
ch.pipeline().addLast(HANDLER, new MinecraftConnection(ch, server));
|
||||||
connection.setState(StateRegistry.HANDSHAKE);
|
|
||||||
ch.pipeline().addLast(HANDLER, connection);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.connect(serverInfo.getAddress())
|
.connect(serverInfo.getAddress())
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren