aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0682-WorldCreator-keepSpawnLoaded.patch
blob: ab38fc7006a21a5f1b7c793f0c6ac0720fecf382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 430b35c35c7aa17d590031515063f2d24eeffe5c..4b894223387bf4029bbfa15d9605247935d7f829 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1328,7 +1328,7 @@ public final class CraftServer implements Server {
         }
 
         // If set to not keep spawn in memory (changed from default) then adjust rule accordingly
-        if (!creator.keepSpawnInMemory()) {
+        if (creator.keepSpawnLoaded() == net.kyori.adventure.util.TriState.FALSE) { // Paper
             worlddata.getGameRules().getRule(GameRules.RULE_SPAWN_CHUNK_RADIUS).set(0, null);
         }
         ServerLevel internal = (ServerLevel) new ServerLevel(this.console, this.console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(worlddata.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS)),