fix capes startup

This commit is contained in:
Bella 2020-03-06 17:32:29 -05:00
parent 412fc60112
commit 553f48e08a
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 3 additions and 4 deletions

View File

@ -196,8 +196,10 @@ public class KamiMod {
try { // load modules that are on by default // autoenable
ModuleManager.getModuleByName("InfoOverlay").setEnabled(true);
ModuleManager.getModuleByName("InventoryViewer").setEnabled(true);
ModuleManager.getModuleByName("Capes").setEnabled(true);
if (((Capes) ModuleManager.getModuleByName("Capes")).startupGlobal.getValue()) {
ModuleManager.getModuleByName("Capes").setEnabled(true);
}
if (((DiscordSettings) ModuleManager.getModuleByName("DiscordSettings")).startupGlobal.getValue()) {
ModuleManager.getModuleByName("DiscordSettings").setEnabled(true);
}
@ -216,9 +218,6 @@ public class KamiMod {
if (((PrefixChat) ModuleManager.getModuleByName("PrefixChat")).startupGlobal.getValue()) {
ModuleManager.getModuleByName("PrefixChat").setEnabled(true);
}
if (((Capes) ModuleManager.getModuleByName("Capes")).startupGlobal.getValue()) {
ModuleManager.getModuleByName("Capes").setEnabled(true);
}
}
catch (NullPointerException e) {
KamiMod.log.error("NPE in loading always enabled modules\n");