Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/patches/server/0718-WorldCreator-keepSpawnLoaded.patch

26 Zeilen
1.3 KiB
Diff

2024-04-24 22:05:42 +02:00
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 2c4a52e9f5c6d8d70e390b1805949549fec891e0..2e54a42904cf4b8d0e30a464c18486cc8cce774a 100644
2024-04-24 22:05:42 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2024-04-25 19:42:24 +02:00
@@ -1309,6 +1309,14 @@ public final class CraftServer implements Server {
2024-04-24 22:05:42 +02:00
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