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 a81ad3d8a8
This commit is contained in:
parent
1870320545
commit
373e390735
|
@ -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 <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
||||||
Subject: [PATCH] Paper config files
|
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
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..3d0a00512
|
index 0000000..c009c5f
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -0,0 +1,164 @@
|
@@ -0,0 +1,164 @@
|
||||||
|
@ -66,8 +66,8 @@ index 000000000..3d0a00512
|
||||||
+
|
+
|
||||||
+ commands = new HashMap<String, Command>();
|
+ commands = new HashMap<String, Command>();
|
||||||
+
|
+
|
||||||
+ version = getInt("config-version", 11);
|
+ version = getInt("config-version", 12);
|
||||||
+ set("config-version", 11);
|
+ set("config-version", 12);
|
||||||
+ readConfig(PaperConfig.class, null);
|
+ 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
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..dae60dcce
|
index 0000000..dae60dc
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -0,0 +1,72 @@
|
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/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
|
@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
|
@ -268,7 +268,7 @@ index 7336aed80..c6a834580 100644
|
||||||
DedicatedServer.LOGGER.info("Generating keypair");
|
DedicatedServer.LOGGER.info("Generating keypair");
|
||||||
this.a(MinecraftEncryption.b());
|
this.a(MinecraftEncryption.b());
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
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
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/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 {
|
@@ -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.world = new CraftWorld((WorldServer) this, gen, env);
|
||||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
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
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/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 {
|
@@ -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("*");
|
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
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -126,6 +126,14 @@ public class Main {
|
@@ -126,6 +126,14 @@ public class Main {
|
||||||
|
@ -335,5 +335,5 @@ index 21170f377..30b6f3477 100644
|
||||||
};
|
};
|
||||||
|
|
||||||
--
|
--
|
||||||
2.11.0.windows.1
|
2.9.3
|
||||||
|
|
||||||
|
|
|
@ -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 <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Tue, 20 Dec 2016 23:09:21 -0600
|
Date: Tue, 20 Dec 2016 23:09:21 -0600
|
||||||
Subject: [PATCH] Add option to remove invalid statistics
|
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
|
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
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/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() {
|
private static void playerAutoSaveRate() {
|
||||||
playerAutoSaveRate = getInt("settings.player-auto-save-rate", -1);
|
playerAutoSaveRate = getInt("settings.player-auto-save-rate", -1);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public static boolean removeInvalidStatistics = false;
|
+ public static boolean removeInvalidStatistics = false;
|
||||||
+ private static void removeInvalidStatistics() {
|
+ 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
|
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
|
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||||
+++ b/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 {
|
@@ -104,6 +104,7 @@ public class ServerStatisticManager extends StatisticManager {
|
||||||
|
@ -49,5 +53,5 @@ index 99466dbde..d1bee0257 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.11.0
|
2.9.3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue