properly initialize config.yml

This commit is contained in:
dfsek 2021-07-30 08:25:35 -07:00
parent bda3594025
commit ddf1334f6f

View File

@ -88,6 +88,11 @@ public abstract class AbstractTerraPlugin implements TerraPlugin {
e.printStackTrace();
}
config.load(this); // load config.yml
LangUtil.load(config.getLanguage(), this); // load language
if(config.dumpDefaultConfig()) {
try(InputStream resourcesConfig = getClass().getResourceAsStream("/resources.yml")) {
if(resourcesConfig == null) {
@ -121,10 +126,6 @@ public abstract class AbstractTerraPlugin implements TerraPlugin {
getDebugLogger().info("Skipping resource dumping.");
}
config.load(this); // load config.yml
LangUtil.load(config.getLanguage(), this); // load language
debugLogger.value().setDebug(config.isDebugLogging()); // enable debug logger if applicable
if(config.isDebugProfiler()) { // if debug.profiler is enabled, start profiling