mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-08 11:50:32 +01:00
c02c01b2c5
Also removes our toggle for Spigot's option, I doubt anyone uses it.
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
From 2a60bdf1a9f93a1969dfe37d9e6a73fd27dddb2f 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 402dbe7..78dcf26 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -130,4 +130,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 932e826..3e79e02 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -198,6 +198,7 @@ public abstract class World implements IBlockAccess {
|
|
this.getServer().addWorld(this.world);
|
|
// CraftBukkit end
|
|
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
|
}
|
|
--
|
|
2.10.0.windows.1
|
|
|