From 8d43341f1a3e9e1b17a357621f3dd4f2e3507ce4 Mon Sep 17 00:00:00 2001
From: Spigot <noreply+git-spigot@papermc.io>
Date: Mon, 21 Jan 2013 22:53:50 -0500
Subject: [PATCH] Disable the ability to disable chunk-gc

By: Aikar <aikar@aikar.co>
---
 ...es.-This-commit-has-undergone-basic-test.patch | 15 ++++++++++-----
 .../0021-Add-oreobfuscator-for-Spigot.patch       | 10 +++++-----
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/CraftBukkit-Patches/0001-Spigot-Changes.-This-commit-has-undergone-basic-test.patch b/CraftBukkit-Patches/0001-Spigot-Changes.-This-commit-has-undergone-basic-test.patch
index 0b645a47cf..cf17082005 100644
--- a/CraftBukkit-Patches/0001-Spigot-Changes.-This-commit-has-undergone-basic-test.patch
+++ b/CraftBukkit-Patches/0001-Spigot-Changes.-This-commit-has-undergone-basic-test.patch
@@ -1,4 +1,4 @@
-From b0f3a478531964dc847038cb0292af5dc78f3534 Mon Sep 17 00:00:00 2001
+From 90c324d6ba0cda9717efb4bd93cb21c666cc4b75 Mon Sep 17 00:00:00 2001
 From: md_5 <md_5@bigpond.com>
 Date: Sun, 30 Dec 2012 23:56:05 -0600
 Subject: [PATCH] Spigot Changes. This commit has undergone basic testing and
@@ -32,7 +32,7 @@ Subject: [PATCH] Spigot Changes. This commit has undergone basic testing and
  .../java/net/minecraft/server/WorldServer.java     | 133 ++++--
  .../java/org/bukkit/craftbukkit/CraftServer.java   |  98 ++++-
  .../java/org/bukkit/craftbukkit/CraftWorld.java    |  76 +++-
- src/main/java/org/bukkit/craftbukkit/Spigot.java   |  22 +
+ src/main/java/org/bukkit/craftbukkit/Spigot.java   |  27 ++
  .../craftbukkit/chunkio/ChunkIOProvider.java       |   2 +-
  .../bukkit/craftbukkit/command/RestartCommand.java |  24 +
  .../craftbukkit/command/TicksPerSecondCommand.java |  35 ++
@@ -48,7 +48,7 @@ Subject: [PATCH] Spigot Changes. This commit has undergone basic testing and
  .../org/bukkit/craftbukkit/util/TimedThread.java   |  37 ++
  .../bukkit/craftbukkit/util/WatchdogThread.java    |  88 ++++
  src/main/resources/configurations/bukkit.yml       |  55 +++
- 42 files changed, 1670 insertions(+), 156 deletions(-)
+ 42 files changed, 1675 insertions(+), 156 deletions(-)
  create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java
  create mode 100644 src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java
  create mode 100644 src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java
@@ -1579,10 +1579,10 @@ index cb20066..3544aa3 100644
          return getChunkAt(x >> 4, z >> 4).getBlock(x & 0xF, y & 0xFF, z & 0xF);
 diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
 new file mode 100644
-index 0000000..e11aee4
+index 0000000..0e04773
 --- /dev/null
 +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
-@@ -0,0 +1,22 @@
+@@ -0,0 +1,27 @@
 +package org.bukkit.craftbukkit;
 +
 +import org.bukkit.command.SimpleCommandMap;
@@ -1602,6 +1602,11 @@ index 0000000..e11aee4
 +        server.commandComplete = configuration.getBoolean("settings.command-complete", true);
 +        server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions");
 +
++        if (server.chunkGCPeriod == 0) {
++            server.getLogger().severe("[Spigot] You should not disable chunk-gc. Resetting period-in-ticks to 600 ticks.");
++            server.chunkGCPeriod = 600;
++        }
++
 +        org.bukkit.craftbukkit.util.LightningSimulator.configure(configuration);
 +    }
 +}
diff --git a/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch b/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch
index b38f4b429d..3c7e13ecdf 100644
--- a/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch
+++ b/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch
@@ -1,4 +1,4 @@
-From c7846efa49cb600996091600a7295c3bb92b1e74 Mon Sep 17 00:00:00 2001
+From e25646701f0e99f9b8d25c5bab68fce7dabf37ec Mon Sep 17 00:00:00 2001
 From: lishid <lishid@gmail.com>
 Date: Mon, 21 Jan 2013 16:59:04 +1100
 Subject: [PATCH] Add oreobfuscator for Spigot.
@@ -254,7 +254,7 @@ index 0000000..6d5a519
 +    }
 +}
 diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
-index 2b0362a..b6a8d9e 100644
+index a535b69..9f0a99a 100644
 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
 +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
 @@ -24,6 +24,10 @@ public class Spigot {
@@ -265,9 +265,9 @@ index 2b0362a..b6a8d9e 100644
 +        server.orebfuscatorUpdateRadius = configuration.getInt("orebfuscator.update-radius", 2);
 +        server.orebfuscatorDisabledWorlds = configuration.getStringList("orebfuscator.disabled-worlds");
 +
-         org.bukkit.craftbukkit.util.LightningSimulator.configure(configuration);
-     }
- }
+         if (server.chunkGCPeriod == 0) {
+             server.getLogger().severe("[Spigot] You should not disable chunk-gc. Resetting period-in-ticks to 600 ticks.");
+             server.chunkGCPeriod = 600;
 diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
 index c41fac1..fee0bb1 100644
 --- a/src/main/resources/configurations/bukkit.yml