Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
SPIGOT-30: Fix restoring of WorldData when loading worlds
Dieser Commit ist enthalten in:
Ursprung
f498585ecc
Commit
4692204921
@ -114,11 +114,11 @@ import com.google.common.collect.ImmutableList;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.MapMaker;
|
import com.google.common.collect.MapMaker;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufOutputStream;
|
import io.netty.buffer.ByteBufOutputStream;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import io.netty.handler.codec.base64.Base64;
|
import io.netty.handler.codec.base64.Base64;
|
||||||
|
|
||||||
import jline.console.ConsoleReader;
|
import jline.console.ConsoleReader;
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@ -844,8 +844,12 @@ public final class CraftServer implements Server {
|
|||||||
} while(used);
|
} while(used);
|
||||||
boolean hardcore = false;
|
boolean hardcore = false;
|
||||||
|
|
||||||
WorldData worlddata = new WorldData(new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type), name);
|
IDataManager sdm = new ServerNBTManager(getWorldContainer(), name, true);
|
||||||
WorldServer internal = (WorldServer) new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), worlddata, dimension, console.methodProfiler, creator.environment(), generator).b();
|
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()))) {
|
if (!(worlds.containsKey(name.toLowerCase()))) {
|
||||||
return null;
|
return null;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren