diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AntiAFK.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AntiAFK.java index d5fbc94826..925b752411 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AntiAFK.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AntiAFK.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Random; +private int jumpCooldown = 0; public class AntiAFK extends Module { private final SettingGroup sgActions = settings.createGroup("Actions"); @@ -176,12 +177,23 @@ public void onDeactivate() { @EventHandler private void onTick(TickEvent.Pre event) { if (!Utils.canUpdate()) return; - + // Jump if (jump.get()) { - if (mc.options.keyJump.isDown()) mc.options.keyJump.setDown(false); - else if (random.nextInt(99) == 0) mc.options.keyJump.setDown(true); + if (jumpCooldown > 0) { + jumpCooldown--; + } + else { + if (mc.options.keyJump.isDown()) { + mc.options.keyJump.setDown(false); + } + else if (random.nextInt(99) == 0) { + mc.options.keyJump.setDown(true); + jumpCooldown = 20; + } + } } + // Swing if (swing.get() && random.nextInt(99) == 0) {