From a7f78c77593bd1cd60dd05c444744610fe4f8638 Mon Sep 17 00:00:00 2001 From: jie65535 Date: Tue, 13 Jun 2023 23:24:02 +0800 Subject: [PATCH] Skip invalid plugins (#2206) --- src/main/java/emu/grasscutter/plugin/PluginManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/plugin/PluginManager.java b/src/main/java/emu/grasscutter/plugin/PluginManager.java index 09fd56413..c9e7fc510 100644 --- a/src/main/java/emu/grasscutter/plugin/PluginManager.java +++ b/src/main/java/emu/grasscutter/plugin/PluginManager.java @@ -81,7 +81,7 @@ public final class PluginManager { if (pluginConfig.api == null) { Grasscutter.getLogger() .warn(translate("plugin.invalid_api.not_present", plugin.getName())); - return; + continue; } else if (pluginConfig.api != API_VERSION) { Grasscutter.getLogger() .warn( @@ -90,13 +90,13 @@ public final class PluginManager { plugin.getName(), pluginConfig.api, API_VERSION)); - return; + continue; } // Check if the plugin config is valid. if (!pluginConfig.validate()) { Grasscutter.getLogger().warn(translate("plugin.invalid_config", plugin.getName())); - return; + continue; } // Create a JAR file instance from the plugin's URL.