diff --git a/src/main/java/net/minestom/server/network/packet/client/status/PingPacket.java b/src/main/java/net/minestom/server/network/packet/client/status/PingPacket.java index b5b1dd779..5e336a12f 100644 --- a/src/main/java/net/minestom/server/network/packet/client/status/PingPacket.java +++ b/src/main/java/net/minestom/server/network/packet/client/status/PingPacket.java @@ -25,7 +25,7 @@ public class PingPacket implements ClientPreplayPacket { if (clientPingEvent.isCancelled()) { connection.disconnect(); } else { - if (clientPingEvent.getDelay().toMilliseconds() == 0) { + if (clientPingEvent.getDelay().isZero()) { connection.sendPacket(new PongPacket(clientPingEvent.getPayload())); connection.disconnect(); } else {