[CHORE] Try to improve invalid config error messages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
version_major=0
|
||||
version_minor=0
|
||||
version_patch=56
|
||||
version_patch=57
|
||||
|
||||
shade_group=com.hypherionmc.sdlink.shaded.
|
||||
|
||||
|
@@ -25,6 +25,7 @@ public class SDLinkConfig extends ModuleConfig {
|
||||
// WILL TRY TO WRITE THESE TO THE CONFIG
|
||||
public transient static SDLinkConfig INSTANCE;
|
||||
public transient static int configVer = 13;
|
||||
public transient static boolean hasConfigLoaded = false;
|
||||
|
||||
@Path("general")
|
||||
@SpecComment("General Mod Config")
|
||||
@@ -104,6 +105,7 @@ public class SDLinkConfig extends ModuleConfig {
|
||||
@Override
|
||||
public void configReloaded() {
|
||||
INSTANCE = loadConfig(this);
|
||||
hasConfigLoaded = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -95,7 +95,7 @@ public class BotController {
|
||||
* Start the bot and handle all the startup work
|
||||
*/
|
||||
public void initializeBot() {
|
||||
if (SDLinkConfig.INSTANCE == null) {
|
||||
if (SDLinkConfig.INSTANCE == null || !SDLinkConfig.hasConfigLoaded) {
|
||||
logger.error("Failed to load config. Check your log for errors");
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user