Fixed disabling server through config file having no effect

This commit is contained in:
Jonas_Jones 2022-07-25 14:53:21 +02:00
parent 0b61efa72f
commit 47a8698b7d
43 changed files with 1245 additions and 1362 deletions

View file

@ -24,7 +24,7 @@ public class McWebserver implements ModInitializer {
LOGGER.info("McWebserver initialized!");
if (true) {
if (ModConfigs.IS_ENABLED) {
LOGGER.info("Starting Webserver...");
new Thread(() -> {

View file

@ -10,7 +10,7 @@ public class ModConfigs {
private static ModConfigProvider config;
//config
public static Boolean ISENABLED;
public static Boolean IS_ENABLED;
public static int WEB_PORT;
public static String WEB_ROOT;
public static String WEB_FILE_ROOT;
@ -45,7 +45,7 @@ public class ModConfigs {
}
private static void assignConfigs() {
ISENABLED = CONFIG.getOrDefault("basic.isEnabled", false);
IS_ENABLED = CONFIG.getOrDefault("web.isEnabled", false);
WEB_PORT = CONFIG.getOrDefault("web.port", 8080);
WEB_ROOT = CONFIG.getOrDefault("web.root", "webserver/");
WEB_FILE_ROOT = CONFIG.getOrDefault("web.file.root", "index.html");