3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 05:20:07 +01:00

Prevent re-use of internal world dimension IDs. This fixes BUKKIT-448. Thanks to snowleo for the PR.

Dieser Commit ist enthalten in:
Nathan Adams 2012-01-19 16:09:24 +00:00
Ursprung b0f29b1755
Commit 28fcbec3b1

Datei anzeigen

@ -540,6 +540,16 @@ public final class CraftServer implements Server {
}
int dimension = 10 + console.worlds.size();
boolean used = false;
do {
for (WorldServer server : console.worlds) {
used = server.dimension == dimension;
if (used) {
dimension++;
break;
}
}
} while(used);
boolean hardcore = false;
WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), getDefaultGameMode().getValue(), true, hardcore, type), creator.environment(), generator);