mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: granny <granny@purpurmc.org>
|
|
Date: Thu, 30 Jun 2022 02:32:52 -0700
|
|
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 e42a2d631fd7eaa455132e0cf64c9be7707dadb9..cc67217ff6003c83f10c6eeb7d4a2205cb0129c4 100644
|
|
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
|
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
|
@@ -165,6 +165,12 @@ public final class SimplePluginManager implements PluginManager {
|
|
server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
|
continue;
|
|
}
|
|
+ // Purpur start
|
|
+ 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;
|
|
+ }
|
|
+ // Purpur end
|
|
|
|
File replacedFile = plugins.put(description.getName(), file);
|
|
if (replacedFile != null) {
|