60 lines
4.4 KiB
Diff
60 lines
4.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <mrhua269@gmail.com>
|
|
Date: Wed, 8 Jul 2026 23:45:12 +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 9661f033bbb2c00073f1c891e1411c2a9943a37a..7ad9d8d4346781c928b93a45833b65707a9c2044 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
|
|
@@ -76,7 +76,7 @@ public class FileProviderSource implements ProviderSource<Path, Path> {
|
|
}
|
|
|
|
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) { // Shiroha - 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/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index fc789b5a4376db133558e698c65daddd9d8a4bd9..bec12eb481d305659c48205fe30677baba6fd091 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -302,7 +302,7 @@ public final class CraftServer implements Server {
|
|
public static Exception excessiveVelEx;
|
|
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher();
|
|
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer;
|
|
- public final io.papermc.paper.SparksFly spark;
|
|
+ public io.papermc.paper.SparksFly spark; // Paper - spark // Shiroha - Force disable builtin spark
|
|
private final ServerConfiguration serverConfig = new PaperServerConfiguration();
|
|
|
|
// Paper start - Folia region threading API
|
|
@@ -478,7 +478,7 @@ public final class CraftServer implements Server {
|
|
}
|
|
this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes
|
|
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
|
|
- this.spark = new io.papermc.paper.SparksFly(this); // Paper - spark
|
|
+ if (false) this.spark = new io.papermc.paper.SparksFly(this); // Paper - spark // Shiroha - Force disable builtin spark
|
|
}
|
|
|
|
public boolean getCommandBlockOverride(String command) {
|
|
@@ -1050,7 +1050,7 @@ public final class CraftServer implements Server {
|
|
this.reloadData();
|
|
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
|
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
|
- this.spark.registerCommandBeforePlugins(this); // Paper - spark
|
|
+ if (false) this.spark.registerCommandBeforePlugins(this); // Paper - spark // Shiroha - Force disable builtin spark
|
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
|
|
|
@@ -1079,7 +1079,7 @@ public final class CraftServer implements Server {
|
|
this.loadPlugins();
|
|
this.enablePlugins(PluginLoadOrder.STARTUP);
|
|
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
|
- this.spark.registerCommandAfterPlugins(this); // Paper - spark
|
|
+ if (false) this.spark.registerCommandAfterPlugins(this); // Paper - spark // Shiroha - Force disable builtin spark
|
|
// Paper start - brigadier command API
|
|
io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setValid(); // to clear invalid state for event fire below
|
|
io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.callReloadableRegistrarEvent(io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents.COMMANDS, io.papermc.paper.command.brigadier.PaperCommands.INSTANCE, org.bukkit.plugin.Plugin.class, io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.RELOAD); // call commands event for regular plugins
|