13
0
geforkt von Mirrors/Paper

Move configuration option to a system property

Dieser Commit ist enthalten in:
Riley Park 2024-07-20 10:14:55 -07:00
Ursprung 681c01336b
Commit 5fee9c62da
4 geänderte Dateien mit 12 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -487,10 +487,10 @@ index 0000000000000000000000000000000000000000..d9502ba028a96f9cc846f9ed428bd806
+}
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
new file mode 100644
index 0000000000000000000000000000000000000000..9bf81a47b03769a46c995019c3d8016cd161c15d
index 0000000000000000000000000000000000000000..e8694dbb348e23efbe00df9b333b9dc012367aa2
--- /dev/null
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -0,0 +1,321 @@
@@ -0,0 +1,320 @@
+package io.papermc.paper.configuration;
+
+import co.aikar.timings.MinecraftTimings;
@ -549,7 +549,6 @@ index 0000000000000000000000000000000000000000..9bf81a47b03769a46c995019c3d8016c
+ public class Spark extends ConfigurationPart {
+ public boolean enabled = true;
+ public boolean enableImmediately = false;
+ public boolean preferSparkPlugin = false;
+ }
+
+ @Deprecated(forRemoval = true)

Datei anzeigen

@ -22,10 +22,10 @@ is actually processed, this is honestly really just exposed for the misnomers or
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 9bf81a47b03769a46c995019c3d8016cd161c15d..0ab240d1b1d872dffb78f424b388b2b802326832 100644
index e8694dbb348e23efbe00df9b333b9dc012367aa2..5a101cb6dc7f266ddc20688121ebe2403e9145f1 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -295,7 +295,18 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -294,7 +294,18 @@ public class GlobalConfiguration extends ConfigurationPart {
@PostProcess
private void postProcess() {

Datei anzeigen

@ -22226,7 +22226,7 @@ index 0000000000000000000000000000000000000000..85950a1aa732ab8c01ad28bec9e0de14
+ }
+}
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index ae6089f34e2420c0d745165ea0f754f4a9f1880f..c01fda50d9faba2ec373ac14b4a5992f516fac3a 100644
index 8a05be0d203404e8d06d9a80de2e35e473f7f936..d20969e18984c9b93483477f31b079686977b1db 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -29,6 +29,45 @@ public class GlobalConfiguration extends ConfigurationPart {
@ -22275,7 +22275,7 @@ index ae6089f34e2420c0d745165ea0f754f4a9f1880f..c01fda50d9faba2ec373ac14b4a5992f
static void set(GlobalConfiguration instance) {
GlobalConfiguration.instance = instance;
}
@@ -138,21 +177,6 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -137,21 +176,6 @@ public class GlobalConfiguration extends ConfigurationPart {
public int incomingPacketThreshold = 300;
}
@ -22297,7 +22297,7 @@ index ae6089f34e2420c0d745165ea0f754f4a9f1880f..c01fda50d9faba2ec373ac14b4a5992f
public UnsupportedSettings unsupportedSettings;
public class UnsupportedSettings extends ConfigurationPart {
@@ -211,7 +235,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -210,7 +234,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@PostProcess
private void postProcess() {

Datei anzeigen

@ -21,10 +21,10 @@ index 1a734293c9416f13324bb0edf8f950c9029f8bc4..568d0b65bb5010e0ab365cb47b624720
paperweight {
diff --git a/src/main/java/io/papermc/paper/SparksFly.java b/src/main/java/io/papermc/paper/SparksFly.java
new file mode 100644
index 0000000000000000000000000000000000000000..e4cb01a1a50311eae503b568f6e3e599d48302c8
index 0000000000000000000000000000000000000000..785e85465c746dd66d1d3d648746cb1487d16d07
--- /dev/null
+++ b/src/main/java/io/papermc/paper/SparksFly.java
@@ -0,0 +1,177 @@
@@ -0,0 +1,179 @@
+package io.papermc.paper;
+
+import io.papermc.paper.configuration.GlobalConfiguration;
@ -48,6 +48,8 @@ index 0000000000000000000000000000000000000000..e4cb01a1a50311eae503b568f6e3e599
+ public static final String ID = "spark";
+ public static final String COMMAND_NAME = "spark";
+
+ private static final String PREFER_SPARK_PLUGIN_PROPERTY = "paper.preferSparkPlugin";
+
+ private static final int SPARK_YELLOW = 0xffc93a;
+
+ private final Logger logger;
@ -164,7 +166,7 @@ index 0000000000000000000000000000000000000000..e4cb01a1a50311eae503b568f6e3e599
+ }
+
+ public static boolean isPluginPreferred() {
+ return GlobalConfiguration.get().spark.preferSparkPlugin;
+ return Boolean.getBoolean(PREFER_SPARK_PLUGIN_PROPERTY);
+ }
+
+ private static boolean isPluginEnabled(final Server server) {