mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Remove old config options (#7908)
This commit is contained in:
parent
acd50c5287
commit
c34a306393
5 changed files with 79 additions and 11 deletions
|
@ -835,10 +835,10 @@ index 0000000000000000000000000000000000000000..69add4a7f1147015806bc9b63a8340d1
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4ee18a87d3160ef41654116f033a01f2e52513f2
|
||||
index 0000000000000000000000000000000000000000..d25393aa10a02a74f500c520bfb2979428693177
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -0,0 +1,375 @@
|
||||
@@ -0,0 +1,392 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import com.google.common.base.Suppliers;
|
||||
|
@ -886,8 +886,10 @@ index 0000000000000000000000000000000000000000..4ee18a87d3160ef41654116f033a01f2
|
|||
+import org.spongepowered.configurate.ConfigurateException;
|
||||
+import org.spongepowered.configurate.ConfigurationNode;
|
||||
+import org.spongepowered.configurate.ConfigurationOptions;
|
||||
+import org.spongepowered.configurate.NodePath;
|
||||
+import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
+import org.spongepowered.configurate.transformation.ConfigurationTransformation;
|
||||
+import org.spongepowered.configurate.transformation.TransformAction;
|
||||
+import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
|
||||
+
|
||||
+import java.io.File;
|
||||
|
@ -1045,6 +1047,21 @@ index 0000000000000000000000000000000000000000..4ee18a87d3160ef41654116f033a01f2
|
|||
+ LOGGER.warn("The world config file for " + world + " didn't have a version set, assuming latest");
|
||||
+ version.raw(WorldConfiguration.CURRENT_VERSION);
|
||||
+ }
|
||||
+ ConfigurationTransformation.Builder builder = ConfigurationTransformation.builder();
|
||||
+ for (NodePath path : RemovedConfigurations.REMOVED_WORLD_PATHS) {
|
||||
+ builder.addAction(path, TransformAction.remove());
|
||||
+ }
|
||||
+ builder.build().apply(node);
|
||||
+ // ADD FUTURE TRANSFORMS HERE
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void applyGlobalConfigTransformations(ConfigurationNode node) throws ConfigurateException {
|
||||
+ ConfigurationTransformation.Builder builder = ConfigurationTransformation.builder();
|
||||
+ for (NodePath path : RemovedConfigurations.REMOVED_GLOBAL_PATHS) {
|
||||
+ builder.addAction(path, TransformAction.remove());
|
||||
+ }
|
||||
+ builder.build().apply(node);
|
||||
+ // ADD FUTURE TRANSFORMS HERE
|
||||
+ }
|
||||
+
|
||||
|
@ -1214,6 +1231,57 @@ index 0000000000000000000000000000000000000000..4ee18a87d3160ef41654116f033a01f2
|
|||
+ return BasicConfigurationNode.root(options);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/RemovedConfigurations.java b/src/main/java/io/papermc/paper/configuration/RemovedConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..70eca3b294688db4af4445b324d6b5dec988cb73
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/RemovedConfigurations.java
|
||||
@@ -0,0 +1,45 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import org.spongepowered.configurate.NodePath;
|
||||
+
|
||||
+import static org.spongepowered.configurate.NodePath.path;
|
||||
+
|
||||
+interface RemovedConfigurations {
|
||||
+
|
||||
+ NodePath[] REMOVED_WORLD_PATHS = {
|
||||
+ path("elytra-hit-wall-damage"),
|
||||
+ path("queue-light-updates"),
|
||||
+ path("save-queue-limit-for-auto-save"),
|
||||
+ path("max-chunk-sends-per-tick"),
|
||||
+ path("max-chunk-gens-per-tick"),
|
||||
+ path("fire-physics-event-for-redstone"),
|
||||
+ path("fix-zero-tick-instant-grow-farms"),
|
||||
+ path("bed-search-radius"),
|
||||
+ path("lightning-strike-distance-limit"),
|
||||
+ path("fix-wither-targeting-bug"),
|
||||
+ path("remove-corrupt-tile-entities"),
|
||||
+ path("allow-leashing-undead-horse"),
|
||||
+ path("reset-arrow-despawn-timer-on-fall"),
|
||||
+ path("seed-based-feature-search"),
|
||||
+ path("seed-based-feature-search-loads-chunks"),
|
||||
+ path("viewdistances.no-tick-view-distance"),
|
||||
+ path("seed-based-feature-search"), // unneeded as of 1.18
|
||||
+ path("seed-based-feature-search-loads-chunks"), // unneeded as of 1.18
|
||||
+ path("reset-arrow-despawn-timer-on-fall"),
|
||||
+ path("squid-spawn-height"),
|
||||
+ path("viewdistances"),
|
||||
+ };
|
||||
+
|
||||
+ NodePath[] REMOVED_GLOBAL_PATHS = {
|
||||
+ path("queue-light-updates-max-loss"),
|
||||
+ path("sleep-between-chunk-saves"),
|
||||
+ path("remove-invalid-statistics"),
|
||||
+ path("min-chunk-load-threads"),
|
||||
+ path("use-versioned-world"),
|
||||
+ path("save-player-data"), // to spigot (converted)
|
||||
+ path("log-named-entity-deaths"), // default in vanilla
|
||||
+ path("chunk-tasks-per-tick"), // removed in tuinity merge
|
||||
+ path("item-validation", "loc-name")
|
||||
+ };
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4a1a7e9764dc6f64cc2968baf5958d0cde87cbe2
|
||||
|
|
|
@ -297,7 +297,7 @@ index 0000000000000000000000000000000000000000..e75134a6aa92c86aa86430c7603e1112
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index 4ee18a87d3160ef41654116f033a01f2e52513f2..093c157034cb6e245a6cc0a23ded073f05b6bb3c 100644
|
||||
index d25393aa10a02a74f500c520bfb2979428693177..2e8da92c09fca465b754e45e0bf9984b978557e9 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -307,7 +307,7 @@ index 4ee18a87d3160ef41654116f033a01f2e52513f2..093c157034cb6e245a6cc0a23ded073f
|
|||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.Table;
|
||||
import com.mojang.logging.LogUtils;
|
||||
@@ -333,6 +334,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -350,6 +351,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
|
||||
private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
static {
|
||||
|
|
|
@ -690,7 +690,7 @@ index 0000000000000000000000000000000000000000..5a19e30a9b7e65a70f68a429b8ca741f
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index 093c157034cb6e245a6cc0a23ded073f05b6bb3c..6b4635bf556fe966a835a0ba741fbe3fa0083d9a 100644
|
||||
index 2e8da92c09fca465b754e45e0bf9984b978557e9..b1845b20091b2a28a988f729c18415bb801a2b51 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -700,7 +700,7 @@ index 093c157034cb6e245a6cc0a23ded073f05b6bb3c..6b4635bf556fe966a835a0ba741fbe3f
|
|||
import com.destroystokyo.paper.PaperCommand;
|
||||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.Table;
|
||||
@@ -333,6 +334,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -350,6 +351,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
}
|
||||
|
||||
private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
|
@ -708,7 +708,7 @@ index 093c157034cb6e245a6cc0a23ded073f05b6bb3c..6b4635bf556fe966a835a0ba741fbe3f
|
|||
static {
|
||||
COMMANDS.put("paper", new PaperCommand("paper"));
|
||||
}
|
||||
@@ -341,6 +343,11 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -358,6 +360,11 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
COMMANDS.forEach((s, command) -> {
|
||||
server.server.getCommandMap().register(s, "Paper", command);
|
||||
});
|
||||
|
|
|
@ -1017,7 +1017,7 @@ index 0000000000000000000000000000000000000000..80a2dfb266ae1221680a7b24fee2f7e2
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index b49e7949337517dcf1dd0738b3f8573a04efcae5..0ee70d37ac22da84f671b688863ff691961ad652 100644
|
||||
index ab145a47bef1d356e28c719e5c25552ff4bc6555..e4845a818b3a9dc3b06a67b3a461ce506bb37cba 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -2,6 +2,7 @@ package io.papermc.paper.configuration;
|
||||
|
@ -1028,7 +1028,7 @@ index b49e7949337517dcf1dd0738b3f8573a04efcae5..0ee70d37ac22da84f671b688863ff691
|
|||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.Table;
|
||||
import com.mojang.logging.LogUtils;
|
||||
@@ -189,6 +190,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -191,6 +192,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
.register(DoubleOrDefault.SERIALIZER)
|
||||
.register(BooleanOrDefault.SERIALIZER)
|
||||
.register(Duration.SERIALIZER)
|
||||
|
|
|
@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..874f0c2a071994c2145848886caa385e
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index 6d945ae5a63464e43c4ca63ddbf5beb9b6042bca..0230bf8033ed8169085b69014b74737806041370 100644
|
||||
index 2e5718d720744967c5f2ba13805aad53a1dec593..61a26e9312b1a2d0b582778a178f73dbf702039b 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -120,7 +120,7 @@ index 6d945ae5a63464e43c4ca63ddbf5beb9b6042bca..0230bf8033ed8169085b69014b747378
|
|||
import com.destroystokyo.paper.Metrics;
|
||||
import com.destroystokyo.paper.PaperCommand;
|
||||
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray;
|
||||
@@ -339,6 +340,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -356,6 +357,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
private static boolean metricsStarted = false;
|
||||
static {
|
||||
COMMANDS.put("paper", new PaperCommand("paper"));
|
||||
|
|
Loading…
Reference in a new issue