From ec722e664cf5e515d4261002b05776c916bb0e84 Mon Sep 17 00:00:00 2001 From: Konloch Date: Mon, 26 Jul 2021 21:31:00 -0700 Subject: [PATCH] Re-Add One Plugin At A Time Limit --- .../bytecode/club/bytecodeviewer/plugin/PluginManager.java | 6 ++++++ .../club/bytecodeviewer/translation/TranslatedStrings.java | 1 + src/main/resources/translations/english.json | 1 + 3 files changed, 8 insertions(+) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java index e947069d..24174ccd 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java @@ -87,6 +87,12 @@ public final class PluginManager */ public static void runPlugin(Plugin newPluginInstance) { + if (activePlugin != null && !activePlugin.isFinished()) + { + BytecodeViewer.showMessage(TranslatedStrings.ONE_PLUGIN_AT_A_TIME.toString()); + return; + } + //reset the console count consoleCount = 0; exceptionCount = 0; diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java index 42ecb30f..1d02fdf3 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java @@ -77,6 +77,7 @@ public enum TranslatedStrings CLOSE_TAB, PLEASE_SEND_THIS_ERROR_LOG_TO, PLEASE_SEND_RESOURCES, + ONE_PLUGIN_AT_A_TIME, YES, diff --git a/src/main/resources/translations/english.json b/src/main/resources/translations/english.json index e6ca7d48..38a8773c 100644 --- a/src/main/resources/translations/english.json +++ b/src/main/resources/translations/english.json @@ -256,6 +256,7 @@ "CLOSE_TAB": "Close Tab", "PLEASE_SEND_THIS_ERROR_LOG_TO": "Please send this error log to", "PLEASE_SEND_RESOURCES": "If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.", + "ONE_PLUGIN_AT_A_TIME": "There is currently another plugin running right now, please wait for that to finish executing.", "FILES": "Files",