ping look better ! 🔏

This commit is contained in:
Jess H 2024-05-27 09:36:53 +01:00
parent be3aabc5dd
commit d36fba4b5b

View file

@ -17,6 +17,8 @@ public class Ping extends Feature {
Queue<PacketHolder> queue = new LinkedList<>();
long total = 0;
@Config("Seconds")
@Description("How many seconds to add to your ping.\n" +
"§lWarning§r: You might get timed out on high settings (Time-out happens at 30 seconds including real ping).")
@ -30,14 +32,16 @@ public class Ping extends Feature {
@Override
public void onTick() {
text = "Ping "+ (enabled ? " §7[" + queue.size() +"/" + total + "]" : "");
if (mc.player != null && !queue.isEmpty() && queue.peek().passed()) {
text = "Ping "+ (enabled ? " §7[" + queue.size() +"/" + seconds + "]" : "");
total++;
mc.player.connection.sendPacket(Objects.requireNonNull(queue.poll()).getPacket());
}
}
public void onDisable() {
text = "Ping";
total = 0;
}
public void onPacket(PacketEvent.Send e) {