From 8a65e5d05a478a2561a07e30b1da8454b3b5ccd7 Mon Sep 17 00:00:00 2001 From: d1gress <55198830+d1gress@users.noreply.github.com> Date: Thu, 5 Dec 2019 00:06:19 +0800 Subject: [PATCH] patch for mom (#225) * Update AutoQMain.java * Update AutoQMain.java --- .../me/zeroeightsix/kami/module/modules/misc/AutoQMain.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/misc/AutoQMain.java b/src/main/java/me/zeroeightsix/kami/module/modules/misc/AutoQMain.java index d5a77a5c..123132d7 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/misc/AutoQMain.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/misc/AutoQMain.java @@ -10,7 +10,7 @@ import net.minecraft.network.play.client.CPacketChatMessage; /*** * @author S-B99 * Updated by @S-B99 on 29/11/19 - * Updated by d1gress/Qther on 4/12/19 + * Updated by d1gress/Qther on 5/12/2019 */ @Module.Info(name = "AutoQMain", description = "Automatically does \"/queue main\" every X minutes.", category = Module.Category.MISC) public class AutoQMain extends Module { @@ -20,9 +20,13 @@ public class AutoQMain extends Module { private Setting delay = this.register(Settings.doubleBuilder("Wait time").withMinimum(0.2).withValue(7.1).withMaximum(10.0).build()); private double delayTime; + private double oldDelay = 0; @Override public void onUpdate() { + if (oldDelay == 0) oldDelay = delay.getValue(); + else if (oldDelay != delay.getValue()) delayTime = delay.getValue(); + if (delayTime <= 0) { delayTime = (int) (delay.getValue() * 3000); }