ce0e78c103
compile fixes compile fixes
26 Zeilen
1.3 KiB
Diff
26 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sat, 3 Jul 2021 21:18:28 +0100
|
|
Subject: [PATCH] WorldCreator#keepSpawnLoaded
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index c1e558c4c68d098f2e6e32c08044b092d6dda4cc..c95818aa6227985341236f2e735c46ea8742896b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1308,6 +1308,14 @@ public final class CraftServer implements Server {
|
|
internal.setSpawnSettings(true, true);
|
|
// Paper - Put world into worldlist before initing the world; move up
|
|
|
|
+ // Paper start
|
|
+ if (creator.keepSpawnLoaded().toBooleanOrElse(internal.getWorld().getKeepSpawnInMemory())) {
|
|
+ GameRules.IntegerValue rule = internal.getGameRules().getRule(GameRules.RULE_SPAWN_CHUNK_RADIUS);
|
|
+ rule.deserialize("0");
|
|
+ rule.onChanged(internal);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
|
internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
|
|
|