close #357 and prepare #359

This commit is contained in:
Bella 2020-02-19 11:08:29 -05:00
parent 48cecc3c13
commit 59f6d24c26
2 changed files with 7 additions and 3 deletions

View File

@ -189,7 +189,7 @@ public class KamiMod {
ModuleManager.getModules().stream().filter(Module::isEnabled).forEach(Module::enable);
try { // load modules that are on by default // auto enable
try { // load modules that are on by default // autoenable
ModuleManager.getModuleByName("InfoOverlay").setEnabled(true);
ModuleManager.getModuleByName("InventoryViewer").setEnabled(true);
ModuleManager.getModuleByName("Capes").setEnabled(true);
@ -212,6 +212,9 @@ 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");

View File

@ -23,11 +23,12 @@ import java.net.URL;
* Updated by S-B99 on 20/12/19
* Updated by 20kdc on 17/02/20 - changed implementation method, made a module again, made async
*/
@Module.Info(name = "Capes", category = Module.Category.MISC, description = "Controls the display of KAMI Blue capes.")
@Module.Info(name = "Capes", category = Module.Category.GUI, description = "Controls the display of KAMI Blue capes", showOnArray = Module.ShowOnArray.OFF)
public class Capes extends Module {
public Setting<Boolean> startupGlobal = register(Settings.b("Enable Automatically", true));
// This allows controlling if other capes (Mojang, OptiFine) should override the KAMI Blue cape.
public Setting<Boolean> overrideOtherCapes = Settings.b("OverrideOtherCapes", false);
public Setting<Boolean> overrideOtherCapes = Settings.b("Override Mojang / Opti capes", false);
public static Capes INSTANCE;