mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 09:19:38 +01:00
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
From bc01a5ab191290ee198332dab953d8d9d76691f4 Mon Sep 17 00:00:00 2001
|
|
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
|
|
Date: Sat, 7 Mar 2015 21:50:40 -0600
|
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index 13e1a90..32c882e 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -230,6 +230,7 @@ public abstract class World implements IBlockAccess {
|
|
});
|
|
this.getServer().addWorld(this.world);
|
|
// CraftBukkit end
|
|
+ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
|
|
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);
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index 7ad9bb3..8d707f7 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -139,4 +139,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
|
|
|