Add system property to prevent downloading and loading Spark

This commit is contained in:
BillyGalbreath
2022-07-04 12:52:44 -05:00
parent 49a4494a3e
commit 24434478ef
2 changed files with 25 additions and 23 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Spark Profiler
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index aed2209b66f11a0d03473cf19437f3da0e9e573a..353bed51cf7a5be0e7a75c72290976348631381e 100644
index aed2209b66f11a0d03473cf19437f3da0e9e573a..e46c3cb737d644d167b4426b29bb4ade0c24e74e 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -164,6 +164,12 @@ public final class SimplePluginManager implements PluginManager {
@@ -13,7 +13,7 @@ index aed2209b66f11a0d03473cf19437f3da0e9e573a..353bed51cf7a5be0e7a75c7229097634
continue;
}
+ // Purpur start
+ if (plugins.containsKey(description.getName()) && description.getName().equalsIgnoreCase("spark")) {
+ if (!Boolean.getBoolean("Purpur.IReallyDontWantSpark") && plugins.containsKey(description.getName()) && description.getName().equalsIgnoreCase("spark")) {
+ server.getLogger().log(Level.INFO, "Purpur: Using user-provided spark plugin instead of our own.");
+ continue;
+ }