mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Add info about disabled plugins on crash reports
This commit is contained in:
1 parent
8cbb94aed0
commit
ca9c99c283
2 files changed
+43
-11
No files matched your search
@@ -106,8 +106,14 @@ public class PluginManager {
|
||||
return canBeDisabled;
|
||||
}
|
||||
|
||||
public String configName() {
|
||||
return toString().toLowerCase(Locale.ENGLISH).replace('_', '.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final EnumSet<Module> configDisabledModules = EnumSet.noneOf(Module.class);
|
||||
|
||||
public static Stage getStage() {
|
||||
return stage;
|
||||
}
|
||||
@@ -292,8 +298,13 @@ public class PluginManager {
|
||||
private static boolean isEnabled(Configuration config, Module m) {
|
||||
Plugin info = m.instance().getClass().getAnnotation(Plugin.class);
|
||||
|
||||
Property prop = config.get(CATEGORY_MODULES, m.toString().toLowerCase(Locale.ENGLISH).replace('_', '.'), true);
|
||||
prop.comment = StatCollector.translateToLocal(info.unlocalizedDescription());
|
||||
return prop.getBoolean(true);
|
||||
String comment = StatCollector.translateToLocal(info.unlocalizedDescription());
|
||||
Property prop = config.get(CATEGORY_MODULES, m.configName(), true, comment);
|
||||
boolean enabled = prop.getBoolean();
|
||||
|
||||
if (!enabled)
|
||||
configDisabledModules.add(m);
|
||||
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user