60 lines
4.4 KiB
Diff
60 lines
4.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <wangxyper@163.com>
|
|
Date: Sun, 12 Jan 2025 11:00:50 +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 a0b84535a9d3833d4df692b85b272f145559dd80..c2ba46408b5ad727d7a17f21d47b2898bb1ef8b4 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
|
|
@@ -87,7 +87,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) { // 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/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 8eecdc662257edeb67d6823c476c635ba906d4dc..0ab41895a447725e6fa22e49c15e4cf3bf87805d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -314,7 +314,7 @@ public final class CraftServer implements Server {
|
|
public static Exception excessiveVelEx; // Paper - Velocity warnings
|
|
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper
|
|
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes
|
|
- public final io.papermc.paper.SparksFly spark; // Paper - spark
|
|
+ public io.papermc.paper.SparksFly spark; // Paper - spark // Luminol - Force disable builtin spark
|
|
|
|
// Paper start - Folia region threading API
|
|
private final io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler(); // Folia - region threading
|
|
@@ -492,7 +492,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 // Luminol - Force disable builtin spark
|
|
}
|
|
|
|
public boolean getCommandBlockOverride(String command) {
|
|
@@ -1156,7 +1156,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 // Luminol - Force disable builtin spark
|
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
|
|
|
@@ -1185,7 +1185,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 // Luminol - Force disable builtin spark
|
|
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
|
// Paper start - brigadier command API
|
|
io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setValid(); // to clear invalid state for event fire below
|