mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 18:47:20 +01:00
Merge remote-tracking branch 'origin/world-revamp-continue' into dtm/mv5/world-revamp-continue-patch
# Conflicts: # src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java
This commit is contained in:
commit
8f439abd1b
@ -189,7 +189,7 @@ public class WorldManager {
|
|||||||
replace("{world}").with(options.worldName()),
|
replace("{world}").with(options.worldName()),
|
||||||
replace("{error}").with(exception.getMessage())),
|
replace("{error}").with(exception.getMessage())),
|
||||||
world -> {
|
world -> {
|
||||||
newMVWorld(world, parsedGenerator);
|
newMVWorld(world, parsedGenerator, options.useSpawnAdjust());
|
||||||
return Result.success(CreateWorldResult.Success.CREATED,
|
return Result.success(CreateWorldResult.Success.CREATED,
|
||||||
replace("{world}").with(world.getName()));
|
replace("{world}").with(world.getName()));
|
||||||
});
|
});
|
||||||
@ -229,7 +229,7 @@ public class WorldManager {
|
|||||||
replace("{world}").with(options.worldName()),
|
replace("{world}").with(options.worldName()),
|
||||||
replace("{error}").with(exception.getMessage())),
|
replace("{error}").with(exception.getMessage())),
|
||||||
world -> {
|
world -> {
|
||||||
newMVWorld(world, parsedGenerator);
|
newMVWorld(world, parsedGenerator, options.useSpawnAdjust());
|
||||||
return Result.success(ImportWorldResult.Success.IMPORTED,
|
return Result.success(ImportWorldResult.Success.IMPORTED,
|
||||||
replace("{world}").with(options.worldName()));
|
replace("{world}").with(options.worldName()));
|
||||||
});
|
});
|
||||||
@ -241,15 +241,16 @@ public class WorldManager {
|
|||||||
: generator;
|
: generator;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void newMVWorld(@NotNull World world, @Nullable String generator) {
|
private void newMVWorld(@NotNull World world, @Nullable String generator, boolean adjustSpawn) {
|
||||||
WorldConfig worldConfig = worldsConfigManager.addWorldConfig(world.getName());
|
WorldConfig worldConfig = worldsConfigManager.addWorldConfig(world.getName());
|
||||||
|
worldConfig.setAdjustSpawn(adjustSpawn);
|
||||||
|
worldConfig.setGenerator(generator == null ? "" : generator);
|
||||||
|
|
||||||
OfflineWorld offlineWorld = new OfflineWorld(world.getName(), worldConfig);
|
OfflineWorld offlineWorld = new OfflineWorld(world.getName(), worldConfig);
|
||||||
offlineWorldsMap.put(offlineWorld.getName(), offlineWorld);
|
offlineWorldsMap.put(offlineWorld.getName(), offlineWorld);
|
||||||
|
|
||||||
MVWorld mvWorld = new MVWorld(world, worldConfig, blockSafety, safeTTeleporter, locationManipulation);
|
MVWorld mvWorld = new MVWorld(world, worldConfig, blockSafety, safeTTeleporter, locationManipulation);
|
||||||
worldsMap.put(mvWorld.getName(), mvWorld);
|
worldsMap.put(mvWorld.getName(), mvWorld);
|
||||||
mvWorld.getWorldConfig().setGenerator(generator == null ? "" : generator);
|
|
||||||
saveWorldsConfig();
|
saveWorldsConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user