ping look better ! 🔏
This commit is contained in:
parent
be3aabc5dd
commit
d36fba4b5b
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue