diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-29 19:51:05 +0200 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-29 19:51:05 +0200 |
commit | 26672b7db8e2d85f8a0d7036bfe37ceabb06dff6 (patch) | |
tree | 75e4b92019ea1a13ba8a49f6305ac8d717664c1a | |
parent | fdfadd23d09eced7d45d93cf24680aaba1beb6aa (diff) | |
parent | 46922049214f37fbc6369a6f1391f3963ff2d3be (diff) | |
download | craftbukkit-26672b7db8e2d85f8a0d7036bfe37ceabb06dff6.tar craftbukkit-26672b7db8e2d85f8a0d7036bfe37ceabb06dff6.tar.gz craftbukkit-26672b7db8e2d85f8a0d7036bfe37ceabb06dff6.tar.lz craftbukkit-26672b7db8e2d85f8a0d7036bfe37ceabb06dff6.tar.xz craftbukkit-26672b7db8e2d85f8a0d7036bfe37ceabb06dff6.zip |
Merge pull request #6 in SPIGOT/craftbukkit from ~MIKEPRIMM/craftbukkit:mikeprimm/SPIGOT-30 to master
* commit '46922049214f37fbc6369a6f1391f3963ff2d3be':
SPIGOT-30: Fix restoring of WorldData when loading worlds
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index f2a78c17..f2bbe1b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -114,11 +114,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.MapMaker; import com.mojang.authlib.GameProfile; + import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufOutputStream; import io.netty.buffer.Unpooled; import io.netty.handler.codec.base64.Base64; - import jline.console.ConsoleReader; public final class CraftServer implements Server { @@ -844,8 +844,12 @@ public final class CraftServer implements Server { } while(used); boolean hardcore = false; - WorldData worlddata = new WorldData(new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type), name); - WorldServer internal = (WorldServer) new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), worlddata, dimension, console.methodProfiler, creator.environment(), generator).b(); + IDataManager sdm = new ServerNBTManager(getWorldContainer(), name, true); + WorldData worlddata = sdm.getWorldData(); + if (worlddata == null) { + worlddata = new WorldData(new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type), name); + } + WorldServer internal = (WorldServer) new WorldServer(console, sdm, worlddata, dimension, console.methodProfiler, creator.environment(), generator).b(); if (!(worlds.containsKey(name.toLowerCase()))) { return null; |