mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-26 19:08:03 +01:00
Fix an error if the server is starting with bluemap and newly generated worlds, now really
This commit is contained in:
parent
e4daeebecf
commit
d607e49ede
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user