aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0830-WorldCreator-keepSpawnLoaded.patch
blob: 18bb31ffcd60d1b33185ed7fbd8fd6a84f1a46e7 (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 1bd1565b02fdcf22e0cb550290ad1ae792002cc0..733b18de16e7924ae81a9255bcd061f95628630f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1249,6 +1249,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