aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0816-WorldCreator-keepSpawnLoaded.patch
blob: 43f195c5d084c13d5c87fd7a49425e58e39c893b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 a34cbc27c41f073ed473be39d41867ac2b9a7cd9..659367b869509ecfcc16d6e9088368b0dec7e098 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1285,6 +1285,7 @@ public final class CraftServer implements Server {
         internal.setSpawnSettings(true, true);
         // Paper - move up
 
+        internal.keepSpawnInMemory = creator.keepSpawnLoaded().toBooleanOrElse(internal.getWorld().getKeepSpawnInMemory()); // Paper
         this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
         //internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system