geforkt von Mirrors/Paper
37 Zeilen
1.7 KiB
Diff
37 Zeilen
1.7 KiB
Diff
From 7d0a8e445a94605d8511782d0268585bc6a7ff6b Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
|
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 35a596f..fb27c66 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -122,4 +122,10 @@ public class PaperWorldConfig {
|
|
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 1c2db29..c31cc0c 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -197,6 +197,7 @@ public abstract class World implements IBlockAccess {
|
|
});
|
|
this.getServer().addWorld(this.world);
|
|
// CraftBukkit end
|
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
|
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);
|
|
--
|
|
2.7.3
|
|
|