mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-07 11:20:09 +01:00
Fix server ping
This commit is contained in:
parent
a5839ae1c8
commit
d4637f328b
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user