From 74692cfcd35fcfa66bab3286d44588c3a0f02512 Mon Sep 17 00:00:00 2001 From: Dmck2b Date: Wed, 9 Jul 2014 00:00:00 +0100 Subject: [PATCH] Allow toggling of chunk persistance --- ...-of-spawn-chunks-always-being-loaded.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 CraftBukkit-Patches/0025-Allow-disabling-of-spawn-chunks-always-being-loaded.patch diff --git a/CraftBukkit-Patches/0025-Allow-disabling-of-spawn-chunks-always-being-loaded.patch b/CraftBukkit-Patches/0025-Allow-disabling-of-spawn-chunks-always-being-loaded.patch new file mode 100644 index 0000000000..494ceda661 --- /dev/null +++ b/CraftBukkit-Patches/0025-Allow-disabling-of-spawn-chunks-always-being-loaded.patch @@ -0,0 +1,38 @@ +From 10c0a8d570500dbaf141cd09c19e30a06e59184a Mon Sep 17 00:00:00 2001 +From: Dmck2b +Date: Tue, 8 Jul 2014 23:55:29 +0100 +Subject: [PATCH] Allow disabling of spawn chunks always being loaded + + +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 9b10da7..1d949e7 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -285,6 +285,8 @@ public abstract class World implements IBlockAccess { + + this.B(); + this.a(); ++ ++ this.keepSpawnInMemory = paperSpigotConfig.keepSpawnInMemory; + + this.getServer().addWorld(this.world); // CraftBukkit + } +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index e627c4e..39bbd62 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -162,4 +162,11 @@ public class PaperSpigotWorldConfig + softDespawnDistance = softDespawnDistance*softDespawnDistance; + hardDespawnDistance = hardDespawnDistance*hardDespawnDistance; + } ++ ++ public boolean keepSpawnInMemory; ++ private void keepSpawnInMemory() ++ { ++ keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true ); ++ log( "Keep spawn chunk loaded: " + keepSpawnInMemory ); ++ } + } +-- +1.9.1 +