From b31bdecbeb1578a48c3de287bc7927d696604b4e Mon Sep 17 00:00:00 2001 From: SleepingPig35 Date: Mon, 8 Jul 2024 12:56:38 +0100 Subject: [PATCH 1/5] Update Commands.java --- src/main/java/keystrokesmod/utility/Commands.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/keystrokesmod/utility/Commands.java b/src/main/java/keystrokesmod/utility/Commands.java index 45c1cc5fd..a3f5a91a6 100644 --- a/src/main/java/keystrokesmod/utility/Commands.java +++ b/src/main/java/keystrokesmod/utility/Commands.java @@ -266,7 +266,18 @@ public static void rCMD(@NotNull String c) { print("&a" + module.getName() + " is now visible in HUD", 1); } } - } else if (args.get(0).equals("rename")) { + } else if (args.get(0).equals("panic")) { + List modulesToDisable = new ArrayList<>(); + for (Module m : Raven.getModuleManager().getModules()) { + if (m.isEnabled()) { + modulesToDisable.add(m); + } + } + for (Module m : modulesToDisable) { + m.disable(); + + } + }else if (args.get(0).equals("rename")) { if (!hasArgs) { print(invSyn, 1); return; From 27244974ca919f42018f645d670accf3ab057b8c Mon Sep 17 00:00:00 2001 From: SleepingPig35 Date: Mon, 8 Jul 2024 12:57:34 +0100 Subject: [PATCH 2/5] Update ModuleManager.java --- src/main/java/keystrokesmod/module/ModuleManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/keystrokesmod/module/ModuleManager.java b/src/main/java/keystrokesmod/module/ModuleManager.java index 6807f2e7d..a6d5642ee 100644 --- a/src/main/java/keystrokesmod/module/ModuleManager.java +++ b/src/main/java/keystrokesmod/module/ModuleManager.java @@ -87,7 +87,8 @@ public class ModuleManager { public static BlockHit blockHit; public static FullBright fullBright; public static ModSpoofer modSpoofer; - + public static Panic panic; + public void register() { this.addModule(autoClicker = new AutoClicker()); this.addModule(longJump = new LongJump()); @@ -204,6 +205,7 @@ public void register() { this.addModule(fullBright = new FullBright()); this.addModule(new AutoPot()); this.addModule(modSpoofer = new ModSpoofer()); + this.addModule(panic = new Panic()); antiBot.enable(); commandChat.enable(); modSpoofer.enable(); From d4abd8242964bed7285aaae0396868e64264ed2d Mon Sep 17 00:00:00 2001 From: SleepingPig35 Date: Mon, 8 Jul 2024 12:58:17 +0100 Subject: [PATCH 3/5] Add files via upload --- .../module/impl/other/Panic.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/java/keystrokesmod/module/impl/other/Panic.java diff --git a/src/main/java/keystrokesmod/module/impl/other/Panic.java b/src/main/java/keystrokesmod/module/impl/other/Panic.java new file mode 100644 index 000000000..b69c924f5 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/other/Panic.java @@ -0,0 +1,30 @@ +package keystrokesmod.module.impl.other; + +import keystrokesmod.Raven; +import keystrokesmod.module.Module; +import keystrokesmod.module.setting.impl.DescriptionSetting; +import keystrokesmod.module.ModuleManager; +import java.util.ArrayList; +import java.util.List; + +public class Panic extends Module { + public Panic() { + super("Panic", category.other); + this.registerSetting(new DescriptionSetting("Disables all modules.")); + } + + @Override + public void onEnable() { + List modulesToDisable = new ArrayList<>(); + for (Module m : Raven.getModuleManager().getModules()) { + if (m.isEnabled()) { + modulesToDisable.add(m); + } + } + for (Module m : modulesToDisable) { + m.disable(); + + } + this.disable(); + } +} From 12c1a86eb3adb5399b5b7dd7feeb3299a1e024a4 Mon Sep 17 00:00:00 2001 From: SleepingPig35 Date: Mon, 8 Jul 2024 12:59:05 +0100 Subject: [PATCH 4/5] Update Panic.java --- src/main/java/keystrokesmod/module/impl/other/Panic.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/keystrokesmod/module/impl/other/Panic.java b/src/main/java/keystrokesmod/module/impl/other/Panic.java index b69c924f5..7529787c6 100644 --- a/src/main/java/keystrokesmod/module/impl/other/Panic.java +++ b/src/main/java/keystrokesmod/module/impl/other/Panic.java @@ -3,7 +3,6 @@ import keystrokesmod.Raven; import keystrokesmod.module.Module; import keystrokesmod.module.setting.impl.DescriptionSetting; -import keystrokesmod.module.ModuleManager; import java.util.ArrayList; import java.util.List; From b9887e67327647a99af1c9c6169a46e2a9e59c11 Mon Sep 17 00:00:00 2001 From: SleepingPig35 Date: Mon, 8 Jul 2024 13:50:38 +0100 Subject: [PATCH 5/5] Update Commands.java --- src/main/java/keystrokesmod/utility/Commands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/keystrokesmod/utility/Commands.java b/src/main/java/keystrokesmod/utility/Commands.java index a3f5a91a6..cc72672cc 100644 --- a/src/main/java/keystrokesmod/utility/Commands.java +++ b/src/main/java/keystrokesmod/utility/Commands.java @@ -488,6 +488,7 @@ public static void rCMD(@NotNull String c) { print("6 hide/show [module]", 0); print("7 rename [module] [name]", 0); print("8 say [message]", 0); + print("9 panic", 0); print("&eProfiles:", 0); print("1 profiles", 0); print("2 profiles save [profile]", 0);