mirror of
https://github.com/PaperMC/Folia.git
synced 2024-12-02 13:43:31 +01:00
177c892d77
This allows the spark plugin to be loaded without setting the startup flag
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Wed, 31 Jul 2024 11:27:24 -0700
|
|
Subject: [PATCH] Disable spark profiler
|
|
|
|
It's not thread-safe. The plugin instead needs to be used.
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/SparksFly.java b/src/main/java/io/papermc/paper/SparksFly.java
|
|
index c7c396a7a94c35d973eb0796f8aba6e669ed5b7c..5e1eb6e1853ff19f26ca6f01dac77a05c804f539 100644
|
|
--- a/src/main/java/io/papermc/paper/SparksFly.java
|
|
+++ b/src/main/java/io/papermc/paper/SparksFly.java
|
|
@@ -108,7 +108,7 @@ public final class SparksFly {
|
|
|
|
private void enable() {
|
|
if (!this.enabled) {
|
|
- if (GlobalConfiguration.get().spark.enabled) {
|
|
+ if (false) { // Folia - disable in-built spark profiler
|
|
this.enabled = true;
|
|
this.spark.enable();
|
|
} else {
|
|
@@ -160,7 +160,7 @@ public final class SparksFly {
|
|
}
|
|
|
|
public static boolean isPluginPreferred() {
|
|
- return Boolean.getBoolean(PREFER_SPARK_PLUGIN_PROPERTY);
|
|
+ return true; // Folia - disable in-built spark profiler
|
|
}
|
|
|
|
private static boolean isPluginEnabled(final Server server) {
|