mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-09 04:13:00 +08:00
Skip invalid plugins (#2206)
This commit is contained in:
parent
baac48c4a0
commit
a7f78c7759
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user