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
1 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,7 @@ import org.spongepowered.api.event.game.state.GameStartingServerEvent;
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 class SpongePlugin {
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();