From 9b9cd2ed037063a18b1879df178f68d01dc1a756 Mon Sep 17 00:00:00 2001 From: themode Date: Mon, 8 Mar 2021 02:44:46 +0100 Subject: [PATCH] Remove unnecessary chaining --- .../minestom/server/network/player/NettyPlayerConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/network/player/NettyPlayerConnection.java b/src/main/java/net/minestom/server/network/player/NettyPlayerConnection.java index 91010f1f3..26c46a04a 100644 --- a/src/main/java/net/minestom/server/network/player/NettyPlayerConnection.java +++ b/src/main/java/net/minestom/server/network/player/NettyPlayerConnection.java @@ -201,7 +201,8 @@ public class NettyPlayerConnection extends PlayerConnection { synchronized (tickBuffer) { final ByteBuf copy = tickBuffer.copy(); - ChannelFuture channelFuture = channel.write(new FramedPacket(copy)).addListener(future -> copy.release()); + ChannelFuture channelFuture = channel.write(new FramedPacket(copy)); + channelFuture.addListener(future -> copy.release()); // Netty debug if (MinecraftServer.shouldProcessNettyErrors()) {