mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 07:03:01 +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) {
|
if (pluginConfig.api == null) {
|
||||||
Grasscutter.getLogger()
|
Grasscutter.getLogger()
|
||||||
.warn(translate("plugin.invalid_api.not_present", plugin.getName()));
|
.warn(translate("plugin.invalid_api.not_present", plugin.getName()));
|
||||||
return;
|
continue;
|
||||||
} else if (pluginConfig.api != API_VERSION) {
|
} else if (pluginConfig.api != API_VERSION) {
|
||||||
Grasscutter.getLogger()
|
Grasscutter.getLogger()
|
||||||
.warn(
|
.warn(
|
||||||
@ -90,13 +90,13 @@ public final class PluginManager {
|
|||||||
plugin.getName(),
|
plugin.getName(),
|
||||||
pluginConfig.api,
|
pluginConfig.api,
|
||||||
API_VERSION));
|
API_VERSION));
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the plugin config is valid.
|
// Check if the plugin config is valid.
|
||||||
if (!pluginConfig.validate()) {
|
if (!pluginConfig.validate()) {
|
||||||
Grasscutter.getLogger().warn(translate("plugin.invalid_config", plugin.getName()));
|
Grasscutter.getLogger().warn(translate("plugin.invalid_config", plugin.getName()));
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a JAR file instance from the plugin's URL.
|
// Create a JAR file instance from the plugin's URL.
|
||||||
|
Loading…
Reference in New Issue
Block a user