mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Moved FileConfiguration declaration to loadYamls(). This fixes reload
problems.
This commit is contained in:
@@ -22,7 +22,7 @@ public class YamlHandler{
|
||||
public FileConfiguration spawnLocations;
|
||||
|
||||
public YamlHandler(RandomSpawn instance) {
|
||||
this.plugin = instance;
|
||||
plugin = instance;
|
||||
setupYamls();
|
||||
loadYamls();
|
||||
}
|
||||
@@ -35,14 +35,16 @@ public class YamlHandler{
|
||||
if (!(configFile.exists())){this.plugin.saveResource("config.yml", false);} // loads default config's on first run
|
||||
if (!(worldsFile.exists())){this.plugin.saveResource("worlds.yml", false);}
|
||||
if (!(spawnLocationsFile.exists())){this.plugin.saveResource("spawnLocations.yml", false);}
|
||||
|
||||
}
|
||||
|
||||
public void loadYamls() {
|
||||
|
||||
config = new YamlConfiguration();
|
||||
worlds = new YamlConfiguration();
|
||||
spawnLocations = new YamlConfiguration();
|
||||
}
|
||||
|
||||
public void loadYamls() {
|
||||
loadConfig();
|
||||
|
||||
loadConfig();
|
||||
loadWorlds();
|
||||
loadSpawnLocations();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user