From 574485b5bde0228584e6999441071ef746fe395f Mon Sep 17 00:00:00 2001 From: Riley Park Date: Sat, 20 Jul 2024 10:14:55 -0700 Subject: [PATCH] Move configuration option to a system property --- patches/server/Bundle-spark.patch | 4 +++- patches/server/Paper-config-files.patch | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/server/Bundle-spark.patch b/patches/server/Bundle-spark.patch index 706d8d7236..24857b754e 100644 --- a/patches/server/Bundle-spark.patch +++ b/patches/server/Bundle-spark.patch @@ -48,6 +48,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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..00000000000000000000000000000000 + } + + public static boolean isPluginPreferred() { -+ return GlobalConfiguration.get().spark.preferSparkPlugin; ++ return Boolean.getBoolean(PREFER_SPARK_PLUGIN_PROPERTY); + } + + private static boolean isPluginEnabled(final Server server) { diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 6cadebe5dc..46a61b8d8c 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -549,7 +549,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public class Spark extends ConfigurationPart { + public boolean enabled = true; + public boolean enableImmediately = false; -+ public boolean preferSparkPlugin = false; + } + + @Deprecated(forRemoval = true)