diff options
author | Zach Brown <[email protected]> | 2019-04-07 06:25:40 -0400 |
---|---|---|
committer | Zach Brown <[email protected]> | 2019-04-07 06:35:12 -0400 |
commit | 3b0b967c78ca4018294d4cd261a51de602e9bf16 (patch) | |
tree | 167612fc30b1ad63affea98728d090d16e9940e9 | |
parent | e0847a4cea008c39a72e6cfeea1486a8d01b16c3 (diff) | |
download | Paper-3b0b967c78ca4018294d4cd261a51de602e9bf16.tar.gz Paper-3b0b967c78ca4018294d4cd261a51de602e9bf16.zip |
Allow disabling village sieges entirely
Fixes GH-1944
-rw-r--r-- | Spigot-Server-Patches/0381-Allow-disabling-village-sieges.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0381-Allow-disabling-village-sieges.patch b/Spigot-Server-Patches/0381-Allow-disabling-village-sieges.patch new file mode 100644 index 0000000000..01d0fc7e07 --- /dev/null +++ b/Spigot-Server-Patches/0381-Allow-disabling-village-sieges.patch @@ -0,0 +1,37 @@ +From e7ec410152443120d21bc738121f9ccea800518b Mon Sep 17 00:00:00 2001 +From: Zach Brown <[email protected]> +Date: Sun, 7 Apr 2019 06:22:54 -0400 +Subject: [PATCH] Allow disabling village sieges + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index ba299afc..319b5b95 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -587,4 +587,10 @@ public class PaperWorldConfig { + this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); + log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); + } ++ ++ public boolean villageSiegesEnabled = true; ++ private void villageSiegesEnabled() { ++ this.villageSiegesEnabled = getBoolean("game-mechanics.village-sieges-enabled", this.villageSiegesEnabled); ++ log("Village sieges are " + (this.villageSiegesEnabled ? "enabled" : "disabled")); ++ } + } +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index d29420dd..e545e976 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -334,7 +334,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + this.methodProfiler.c("village"); + timings.doVillages.startTiming(); // Spigot + this.villages.tick(); +- this.siegeManager.a(); ++ if (paperConfig.villageSiegesEnabled) { this.siegeManager.a(); } // Paper - Allow disabling village sieges + timings.doVillages.stopTiming(); // Spigot + this.methodProfiler.c("portalForcer"); + timings.doPortalForcer.startTiming(); // Spigot +-- +2.21.0 + |