From bccbc72945a8a199d0d6a197b5a3f7b3e2469692 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Fri, 18 Mar 2016 16:41:26 -0500 Subject: [PATCH] Move config change into config patch --- ...urable-Non-Player-Arrow-Despawn-Rate.patch | 36 ------------------- .../Paper-config-files.patch | 7 ++-- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/Spigot-Server-Patches/Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/Configurable-Non-Player-Arrow-Despawn-Rate.patch index b41850c13c..f9c6e153a8 100644 --- a/Spigot-Server-Patches/Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -9,29 +9,6 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +0,0 @@ package com.destroystokyo.paper; - - import java.util.List; - -+import net.minecraft.server.World; - import org.bukkit.Bukkit; - import org.bukkit.configuration.file.YamlConfiguration; -+import org.spigotmc.SpigotWorldConfig; - - public class PaperWorldConfig { - - private final String worldName; -+ private final SpigotWorldConfig spigotConfig; - private final YamlConfiguration config; - private boolean verbose; - -- public PaperWorldConfig(String worldName) { -+ public PaperWorldConfig(String worldName, SpigotWorldConfig spigotConfig) { - this.worldName = worldName; -+ this.spigotConfig = spigotConfig; - this.config = PaperConfig.config; - init(); - } @@ -0,0 +0,0 @@ public class PaperWorldConfig { private void allowLeashingUndeadHorse() { allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); @@ -59,17 +36,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.die(); } } else { -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - - protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) { - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot -- this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig( worlddata.getName() ); // Paper -+ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig( worlddata.getName(), this.spigotConfig); // Paper - this.generator = gen; - this.world = new CraftWorld((WorldServer) this, gen, env); - this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index 76f0ccc1be..e492e843fa 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -144,15 +144,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + +import org.bukkit.Bukkit; +import org.bukkit.configuration.file.YamlConfiguration; ++import org.spigotmc.SpigotWorldConfig; + +public class PaperWorldConfig { + + private final String worldName; ++ private final SpigotWorldConfig spigotConfig; + private final YamlConfiguration config; + private boolean verbose; + -+ public PaperWorldConfig(String worldName) { ++ public PaperWorldConfig(String worldName, SpigotWorldConfig spigotConfig) { + this.worldName = worldName; ++ this.spigotConfig = spigotConfig; + this.config = PaperConfig.config; + init(); + } @@ -236,7 +239,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot -+ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig( worlddata.getName() ); // Paper ++ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit