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 bb682e9548
Commit 574485b5bd
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -48,6 +48,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static final String ID = "spark"; + public static final String ID = "spark";
+ public static final String COMMAND_NAME = "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 static final int SPARK_YELLOW = 0xffc93a;
+ +
+ private final Logger logger; + private final Logger logger;
@ -164,7 +166,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ +
+ public static boolean isPluginPreferred() { + public static boolean isPluginPreferred() {
+ return GlobalConfiguration.get().spark.preferSparkPlugin; + return Boolean.getBoolean(PREFER_SPARK_PLUGIN_PROPERTY);
+ } + }
+ +
+ private static boolean isPluginEnabled(final Server server) { + private static boolean isPluginEnabled(final Server server) {

Datei anzeigen

@ -549,7 +549,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public class Spark extends ConfigurationPart { + public class Spark extends ConfigurationPart {
+ public boolean enabled = true; + public boolean enabled = true;
+ public boolean enableImmediately = false; + public boolean enableImmediately = false;
+ public boolean preferSparkPlugin = false;
+ } + }
+ +
+ @Deprecated(forRemoval = true) + @Deprecated(forRemoval = true)