remove a warning

This commit is contained in:
Daniella / Tove 2024-05-27 10:21:34 +02:00
parent dd66d5c607
commit fd06d7d45f

View file

@ -9,6 +9,7 @@ import com.baseband.client.module.category.World;
import net.minecraft.network.play.client.CPacketKeepAlive;
import java.util.LinkedList;
import java.util.Objects;
import java.util.Queue;
@World
@ -31,7 +32,7 @@ public class Ping extends Feature {
public void onTick() {
if (mc.player != null && !queue.isEmpty() && queue.peek().passed()) {
text = "Ping "+ (enabled ? " §7[" + queue.size() +"/" + seconds + "]" : "");
mc.player.connection.sendPacket(queue.poll().getPacket());
mc.player.connection.sendPacket(Objects.requireNonNull(queue.poll()).getPacket());
}
}