Moves config loading to finisSetup() to prevent a NullPointerException
This commit is contained in:
parent
d754247455
commit
01df8db0bf
@ -60,19 +60,19 @@ public final class StargateConfig {
|
|||||||
portalFolder = dataFolderPath + "/portals/";
|
portalFolder = dataFolderPath + "/portals/";
|
||||||
gateFolder = dataFolderPath + "/gates/";
|
gateFolder = dataFolderPath + "/gates/";
|
||||||
languageLoader = new LanguageLoader(dataFolderPath + "/lang/");
|
languageLoader = new LanguageLoader(dataFolderPath + "/lang/");
|
||||||
|
|
||||||
this.loadConfig();
|
|
||||||
|
|
||||||
//Enable the required channels for Bungee support
|
|
||||||
if (stargateGateConfig.enableBungee()) {
|
|
||||||
startStopBungeeListener(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finish the config setup by loading languages, gates and portals, and loading economy if vault is loaded
|
* Finish the config setup by loading languages, gates and portals, and loading economy if vault is loaded
|
||||||
*/
|
*/
|
||||||
public void finishSetup() {
|
public void finishSetup() {
|
||||||
|
this.loadConfig();
|
||||||
|
|
||||||
|
//Enable the required channels for Bungee support
|
||||||
|
if (stargateGateConfig.enableBungee()) {
|
||||||
|
startStopBungeeListener(true);
|
||||||
|
}
|
||||||
|
|
||||||
//Set the chosen language and reload the language loader
|
//Set the chosen language and reload the language loader
|
||||||
languageLoader.setChosenLanguage(languageName);
|
languageLoader.setChosenLanguage(languageName);
|
||||||
languageLoader.reload();
|
languageLoader.reload();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user