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

38 lines
1.7 KiB
Diff
Raw Normal View History

From 3688509ebd26b57e70a5d28caa24be2d44e3f387 Mon Sep 17 00:00:00 2001
2014-07-08 23:00:00 +00:00
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
2015-03-08 01:16:09 +00:00
Date: Sat, 7 Mar 2015 21:50:40 -0600
Subject: [PATCH] Allow for toggling of spawn chunks
2014-07-08 23:00:00 +00:00
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index af60059..03eb5f2 100644
2014-07-08 23:00:00 +00:00
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
2015-03-20 00:41:36 +00:00
@@ -230,6 +230,7 @@ public abstract class World implements IBlockAccess {
2015-03-08 01:16:09 +00:00
});
this.getServer().addWorld(this.world);
// CraftBukkit end
+ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
2015-03-08 01:16:09 +00:00
timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
2014-07-08 23:00:00 +00:00
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 1164186..b7703a0 100644
2014-07-08 23:00:00 +00:00
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
2014-11-28 01:17:45 +00:00
@@ -139,4 +139,11 @@ public class PaperSpigotWorldConfig
2014-07-08 23:00:00 +00:00
softDespawnDistance = softDespawnDistance*softDespawnDistance;
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
}
2014-11-28 01:17:45 +00:00
+
2014-07-08 23:00:00 +00:00
+ public boolean keepSpawnInMemory;
+ private void keepSpawnInMemory()
+ {
+ keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
+ }
}
--
2.5.1
2014-07-08 23:00:00 +00:00