Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +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:
Ursprung
b0f29b1755
Commit
28fcbec3b1
@ -540,6 +540,16 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int dimension = 10 + console.worlds.size();
|
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;
|
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);
|
WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), getDefaultGameMode().getValue(), true, hardcore, type), creator.environment(), generator);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren