mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-25 11:46:54 +01:00
Fix NPE when plugins access WorldGenerator during startup [SD-8519]
This commit is contained in:
parent
cc99b9c856
commit
60b92cfa3a
@ -65,7 +65,7 @@ public class SkyBlock extends SongodaPlugin {
|
||||
private static SkyBlock INSTANCE;
|
||||
|
||||
private FileManager fileManager;
|
||||
private WorldManager worldManager;
|
||||
private final WorldManager worldManager = new WorldManager(this);
|
||||
private UserCacheManager userCacheManager;
|
||||
private VisitManager visitManager;
|
||||
private BanManager banManager;
|
||||
@ -166,7 +166,7 @@ public class SkyBlock extends SongodaPlugin {
|
||||
|
||||
permissionManager = new PermissionManager(this);
|
||||
localizationManager = new LocalizationManager();
|
||||
worldManager = new WorldManager(this);
|
||||
worldManager.loadWorlds();
|
||||
userCacheManager = new UserCacheManager(this);
|
||||
visitManager = new VisitManager(this);
|
||||
banManager = new BanManager(this);
|
||||
@ -184,7 +184,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
structureManager = new StructureManager(this);
|
||||
soundManager = new SoundManager(this);
|
||||
|
||||
|
||||
if (this.config.getBoolean("Island.Generator.Enable")) {
|
||||
generatorManager = new GeneratorManager(this);
|
||||
}
|
||||
@ -206,7 +205,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
|
||||
bankManager = new BankManager(this);
|
||||
|
||||
|
||||
if (this.config.getBoolean("Island.Task.PlaytimeTask")) {
|
||||
new PlaytimeTask(playerDataManager, islandManager).runTaskTimerAsynchronously(this, 0L, 20L);
|
||||
}
|
||||
@ -323,7 +321,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private boolean loadConfigs() {
|
||||
try {
|
||||
biomes = this.getFileManager().getConfig(new File(this.getDataFolder(), "biomes.yml")).getFileConfiguration();
|
||||
@ -500,7 +497,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
return economyManager;
|
||||
}
|
||||
|
||||
|
||||
public FileConfiguration getBiomes() {
|
||||
return biomes;
|
||||
}
|
||||
@ -556,5 +552,4 @@ public class SkyBlock extends SongodaPlugin {
|
||||
public FileConfiguration getScoreboard() {
|
||||
return scoreboard;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ public class WorldManager {
|
||||
|
||||
public WorldManager(SkyBlock plugin) {
|
||||
this.plugin = plugin;
|
||||
|
||||
loadWorlds();
|
||||
}
|
||||
|
||||
public void loadWorlds() {
|
||||
|
Loading…
Reference in New Issue
Block a user