diff --git a/patches/server/0021-Force-disable-builtin-spark-plugin.patch b/patches/server/0021-Force-disable-builtin-spark-plugin.patch new file mode 100644 index 0000000..2248ce4 --- /dev/null +++ b/patches/server/0021-Force-disable-builtin-spark-plugin.patch @@ -0,0 +1,132 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MrHua269 +Date: Tue, 6 Aug 2024 17:53:07 +0800 +Subject: [PATCH] Force disable builtin spark plugin + + +diff --git a/src/main/java/io/papermc/paper/plugin/provider/source/FileProviderSource.java b/src/main/java/io/papermc/paper/plugin/provider/source/FileProviderSource.java +index 48604e7f96adc9e226e034054c5e2bad0b024eb5..99f0c1e4d3437154a1062b0a8f94b7a04dd935af 100644 +--- a/src/main/java/io/papermc/paper/plugin/provider/source/FileProviderSource.java ++++ b/src/main/java/io/papermc/paper/plugin/provider/source/FileProviderSource.java +@@ -88,7 +88,7 @@ public class FileProviderSource implements ProviderSource { + } + + final PluginMeta config = type.getConfig(file); +- if ((config.getName().equals("spark") && config.getMainClass().equals("me.lucko.spark.bukkit.BukkitSparkPlugin")) && !SparksFly.isPluginPreferred()) { ++ if ((config.getName().equals("spark") && config.getMainClass().equals("me.lucko.spark.bukkit.BukkitSparkPlugin")) && !SparksFly.isPluginPreferred() && false) { // Luminol - Force disable builtin spark + LOGGER.info("The spark plugin will not be loaded as this server bundles the spark profiler."); + return; + } +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 242d990c55ddd0629eb5e55a7c5c46d6d51beb17..39c5af1e3a4c2abbd02ccc3574d73aa06affcdf2 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -778,8 +778,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + return scheduledEnd - System.nanoTime() > targetBuffer; + }; +- this.server.spark.tickStart(); // Paper - spark ++ if (false)this.server.spark.tickStart(); // Paper - spark // Luminol - Force disable builtin spark + new com.destroystokyo.paper.event.server.ServerTickStartEvent((int)region.getCurrentTick()).callEvent(); // Paper + // Folia end - region threading + co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper +@@ -1759,7 +1759,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop