testserver/Spigot-Server-Patches/0015-Allow-for-toggling-of-...

37 lines
1.7 KiB
Diff
Raw Normal View History

From 9a9d8af54bf1def19ceb5c483f07e8dbf8654f52 Mon Sep 17 00:00:00 2001
2016-03-03 09:46:26 +00:00
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 03:53:43 -0600
2016-02-29 23:09:49 +00:00
Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 22c1113a1..0094d1a87 100644
2016-02-29 23:09:49 +00:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
2018-01-11 05:31:19 +00:00
@@ -107,4 +107,10 @@ public class PaperWorldConfig {
2016-02-29 23:09:49 +00:00
softDespawnDistance = softDespawnDistance*softDespawnDistance;
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
}
+
+ public boolean keepSpawnInMemory;
+ private void keepSpawnInMemory() {
+ keepSpawnInMemory = getBoolean("keep-spawn-loaded", true);
+ log("Keep spawn chunk loaded: " + keepSpawnInMemory);
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e6b916a5d..05d363171 100644
2016-02-29 23:09:49 +00:00
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -199,6 +199,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
2016-03-03 09:46:26 +00:00
this.getServer().addWorld(this.world);
// CraftBukkit end
2016-03-25 04:59:37 +00:00
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
2016-02-29 23:09:49 +00:00
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
2016-03-25 04:59:37 +00:00
}
2016-02-29 23:09:49 +00:00
--
2.18.0
2016-02-29 23:09:49 +00:00