Fix an error if the server is starting with bluemap and newly generated worlds, now really

This commit is contained in:
Blue (Lukas Rieger) 2019-11-25 11:12:22 +01:00
parent e4daeebecf
commit d607e49ede

View File

@ -54,6 +54,7 @@
import org.spongepowered.api.event.game.state.GameStoppingEvent;
import org.spongepowered.api.plugin.Plugin;
import org.spongepowered.api.scheduler.SpongeExecutorService;
import org.spongepowered.api.world.storage.WorldProperties;
import com.flowpowered.math.vector.Vector2i;
@ -328,6 +329,11 @@ public void onServerStart(GameStartingServerEvent evt) {
syncExecutor = Sponge.getScheduler().createSyncExecutor(this);
asyncExecutor = Sponge.getScheduler().createAsyncExecutor(this);
//save all world properties to generate level_sponge.dat files
for (WorldProperties properties : Sponge.getServer().getAllWorldProperties()) {
Sponge.getServer().saveWorldProperties(properties);
}
asyncExecutor.execute(() -> {
try {
load();