Fix server ping

This commit is contained in:
themode 2020-11-16 12:44:20 +01:00
parent a5839ae1c8
commit d4637f328b

View File

@ -92,7 +92,11 @@ public class NettyPlayerConnection extends PlayerConnection {
@Override @Override
public void sendPacket(@NotNull ServerPacket serverPacket) { public void sendPacket(@NotNull ServerPacket serverPacket) {
if (shouldSendPacket(serverPacket)) { if (shouldSendPacket(serverPacket)) {
channel.write(serverPacket); if (getPlayer() != null) {
channel.write(serverPacket); // Flush on player update
} else {
channel.writeAndFlush(serverPacket);
}
} }
} }