diff options
author | md_5 <git@md-5.net> | 2016-03-28 12:28:12 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-28 12:28:12 +1100 |
commit | 15222c84b49f572175787202ac82cb8efe640477 (patch) | |
tree | f36e4d7bbae84fd79bf7cbb0afa0be9f6982ed3c | |
parent | cac90f623607a49abd54cc3f1db6ac2d59e05961 (diff) | |
download | craftbukkit-15222c84b49f572175787202ac82cb8efe640477.tar craftbukkit-15222c84b49f572175787202ac82cb8efe640477.tar.gz craftbukkit-15222c84b49f572175787202ac82cb8efe640477.tar.lz craftbukkit-15222c84b49f572175787202ac82cb8efe640477.tar.xz craftbukkit-15222c84b49f572175787202ac82cb8efe640477.zip |
SPIGOT-2074: Correctly set custom world settings
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index d330226d..acf14fd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -862,8 +862,9 @@ public final class CraftServer implements Server { IDataManager sdm = new ServerNBTManager(getWorldContainer(), name, true, getHandle().getServer().getDataConverterManager()); WorldData worlddata = sdm.getWorldData(); + WorldSettings worldSettings = null; if (worlddata == null) { - WorldSettings worldSettings = new WorldSettings(creator.seed(), WorldSettings.EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type); + worldSettings = new WorldSettings(creator.seed(), WorldSettings.EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type); worldSettings.setGeneratorSettings(creator.generatorSettings()); worlddata = new WorldData(worldSettings, name); } @@ -874,6 +875,9 @@ public final class CraftServer implements Server { return null; } + if (worldSettings != null) { + internal.a(worldSettings); + } internal.scoreboard = getScoreboardManager().getMainScoreboard().getHandle(); internal.tracker = new EntityTracker(internal); |