mirror of
https://github.com/JonasunderscoreJones/McWebserver.git
synced 2025-10-23 19:39:19 +02:00
Fixed disabling server through config file having no effect
This commit is contained in:
parent
0b61efa72f
commit
47a8698b7d
43 changed files with 1245 additions and 1362 deletions
|
@ -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(() -> {
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue