From 373e3907352698a7f4f6995325c119801c658188 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 27 Dec 2016 19:23:18 -0600 Subject: [PATCH] Make invalid stat removal use proper config key Server-wide static config values should always be prefixed by `settings.`. Get it right @Zbob750, geez Issue introduced in a81ad3d8a877a86aac7068f74c4612028ae5dbc6 --- .../0002-Paper-config-files.patch | 20 +++++++++---------- ...-option-to-remove-invalid-statistics.patch | 16 +++++++++------ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 7f8a743de..6dc329996 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From 5c9c966394d5865e24c8c531e3fc940d83c9669b Mon Sep 17 00:00:00 2001 +From 0ac855dbf62c840c8b3a875d44698b5dca3bba51 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 000000000..3d0a00512 +index 0000000..c009c5f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +1,164 @@ @@ -66,8 +66,8 @@ index 000000000..3d0a00512 + + commands = new HashMap(); + -+ version = getInt("config-version", 11); -+ set("config-version", 11); ++ version = getInt("config-version", 12); ++ set("config-version", 12); + readConfig(PaperConfig.class, null); + } + @@ -176,7 +176,7 @@ index 000000000..3d0a00512 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java new file mode 100644 -index 000000000..dae60dcce +index 0000000..dae60dc --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +1,72 @@ @@ -253,7 +253,7 @@ index 000000000..dae60dcce + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 7336aed80..c6a834580 100644 +index 31756b8..cb83e4f 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -268,7 +268,7 @@ index 7336aed80..c6a834580 100644 DedicatedServer.LOGGER.info("Generating keypair"); this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a32abf0fa..dcd6fc13f 100644 +index 80a8c55..09ca809 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -125,6 +125,8 @@ public abstract class World implements IBlockAccess { @@ -289,7 +289,7 @@ index a32abf0fa..dcd6fc13f 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 50799950f..f4b0871ed 100644 +index 5079995..f4b0871 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -696,6 +696,7 @@ public final class CraftServer implements Server { @@ -316,7 +316,7 @@ index 50799950f..f4b0871ed 100644 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 21170f377..30b6f3477 100644 +index 8f301b9..2cafdb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -126,6 +126,14 @@ public class Main { @@ -335,5 +335,5 @@ index 21170f377..30b6f3477 100644 }; -- -2.11.0.windows.1 +2.9.3 diff --git a/Spigot-Server-Patches/0191-Add-option-to-remove-invalid-statistics.patch b/Spigot-Server-Patches/0191-Add-option-to-remove-invalid-statistics.patch index d6d930cc0..c1c44d0b6 100644 --- a/Spigot-Server-Patches/0191-Add-option-to-remove-invalid-statistics.patch +++ b/Spigot-Server-Patches/0191-Add-option-to-remove-invalid-statistics.patch @@ -1,25 +1,29 @@ -From eb8748d01fdae9225497d11a105d73565e577059 Mon Sep 17 00:00:00 2001 +From 10038468c4a0548b10dade2172ff3db7a54fb27a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 20 Dec 2016 23:09:21 -0600 Subject: [PATCH] Add option to remove invalid statistics diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 668b375e1..569a1a9ab 100644 +index dcb971a..7e0f670 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -246,4 +246,9 @@ public class PaperConfig { +@@ -246,4 +246,13 @@ public class PaperConfig { private static void playerAutoSaveRate() { playerAutoSaveRate = getInt("settings.player-auto-save-rate", -1); } + + public static boolean removeInvalidStatistics = false; + private static void removeInvalidStatistics() { -+ removeInvalidStatistics = getBoolean("remove-invalid-statistics", false); ++ if (version < 12) { ++ boolean oldValue = getBoolean("remove-invalid-statistics", false); ++ set("settings.remove-invalid-statistics", oldValue); ++ } ++ removeInvalidStatistics = getBoolean("settings.remove-invalid-statistics", false); + } } diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java -index 99466dbde..d1bee0257 100644 +index 99466db..d1bee02 100644 --- a/src/main/java/net/minecraft/server/ServerStatisticManager.java +++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java @@ -104,6 +104,7 @@ public class ServerStatisticManager extends StatisticManager { @@ -49,5 +53,5 @@ index 99466dbde..d1bee0257 100644 } } -- -2.11.0 +2.9.3