mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-04-06 16:02:48 +02:00
Introduce a new arguments parser (#1629)
Original commits: * Clean-up * Introduce a new application arguments parser & handler * Clean-up and deprecate `Tools#getLanguageOption` * Fix `-debug` and `-debugall` parameters * found this while debugging, ...why * Remove deprecated parameters * Invoke startup argument parser before handbook generation * Move command map instantiation to `Grasscutter `(prevent making 3 instances on startup) * Ensure \n at EOF Co-authored-by: AnimeGitB <AnimeGitB@bigblueball.in>
This commit is contained in:
@@ -85,7 +85,6 @@ public final class PluginManager {
|
||||
PluginConfig pluginConfig = Grasscutter.getGsonFactory().fromJson(fileReader, PluginConfig.class);
|
||||
// Check if the plugin config is valid.
|
||||
if (!pluginConfig.validate()) {
|
||||
Utils.logObject(pluginConfig);
|
||||
Grasscutter.getLogger().warn("Plugin " + plugin.getName() + " has an invalid config file.");
|
||||
return;
|
||||
}
|
||||
@@ -211,11 +210,7 @@ public final class PluginManager {
|
||||
public void disablePlugins() {
|
||||
this.plugins.forEach((name, plugin) -> {
|
||||
Grasscutter.getLogger().info("Disabling plugin: " + name);
|
||||
try {
|
||||
plugin.onDisable();
|
||||
} catch (Throwable exception) {
|
||||
Grasscutter.getLogger().error("Failed to disable plugin: " + name, exception);
|
||||
}
|
||||
this.disablePlugin(plugin);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user