mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
b3a8254758
By: md_5 <git@md-5.net>
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
--- a/net/minecraft/server/network/ServerConnection.java
|
|
+++ b/net/minecraft/server/network/ServerConnection.java
|
|
@@ -96,14 +96,24 @@
|
|
int j = ServerConnection.this.server.l();
|
|
Object object = j > 0 ? new NetworkManagerServer(j) : new NetworkManager(EnumProtocolDirection.SERVERBOUND);
|
|
|
|
- ServerConnection.this.connections.add(object);
|
|
+ ServerConnection.this.connections.add((NetworkManager) object); // CraftBukkit - decompile error
|
|
channel.pipeline().addLast("packet_handler", (ChannelHandler) object);
|
|
((NetworkManager) object).setPacketListener(new HandshakeListener(ServerConnection.this.server, (NetworkManager) object));
|
|
}
|
|
- }).group((EventLoopGroup) lazyinitvar.a()).localAddress(inetaddress, i)).bind().syncUninterruptibly());
|
|
+ }).group((EventLoopGroup) lazyinitvar.a()).localAddress(inetaddress, i)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit
|
|
}
|
|
}
|
|
|
|
+ // CraftBukkit start
|
|
+ public void acceptConnections() {
|
|
+ synchronized (this.channels) {
|
|
+ for (ChannelFuture future : this.channels) {
|
|
+ future.channel().config().setAutoRead(true);
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public SocketAddress a() {
|
|
List list = this.channels;
|
|
ChannelFuture channelfuture;
|