mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@862299b "Downgrade" Vineflower to 1.10.1 release (#10423) PaperMC/Paper@9e886c4 Remove dead code (LegacyResult) (#10411) PaperMC/Paper@3b078f8 Add API for ticking fluids (#10435) PaperMC/Paper@908b814 Fix inventory desync with PlayerLeashEntityEvent (#10436) PaperMC/Paper@3af1346 Allow setting player list name early PaperMC/Paper@a033033 Added chunk view API (#10398) PaperMC/Paper@c5f68ff Add CartographyItemEvent and get/setResult for CartographyInventory (#10396) PaperMC/Paper@fc53ff5 Add Configuration for finding Structures outside World Border (#10437) PaperMC/Paper@a6b6ecd More Raid API (#7537)
This commit is contained in:
50
patches/server/0302-register-minecraft-debug-commands.patch
Normal file
50
patches/server/0302-register-minecraft-debug-commands.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <contact@granny.dev>
|
||||
Date: Sun, 18 Feb 2024 16:28:32 -0800
|
||||
Subject: [PATCH] register minecraft debug commands
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index b6cc108c2d4361e6f415cfc3ff8c7699a8e222f4..b203394ed62807e7d5df433830993f1d2ee14939 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -221,8 +221,8 @@ public class Commands {
|
||||
JfrCommand.register(this.dispatcher);
|
||||
}
|
||||
|
||||
- if (SharedConstants.IS_RUNNING_IN_IDE) {
|
||||
- TestCommand.register(this.dispatcher);
|
||||
+ if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands || SharedConstants.IS_RUNNING_IN_IDE) { // Purpur
|
||||
+ if (!org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands) TestCommand.register(this.dispatcher); // Purpur
|
||||
ResetChunksCommand.register(this.dispatcher);
|
||||
RaidCommand.register(this.dispatcher);
|
||||
DebugPathCommand.register(this.dispatcher);
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index bc391d27399d8c22e78735ca39aa8ab45efb6413..4ef8eaad4485a2ee920f80556f9dda04e59d2b2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -130,6 +130,10 @@ public class Main {
|
||||
// Paper start - load config files early for access below if needed
|
||||
org.bukkit.configuration.file.YamlConfiguration bukkitConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("bukkit-settings"));
|
||||
org.bukkit.configuration.file.YamlConfiguration spigotConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("spigot-settings"));
|
||||
+ // Purpur start
|
||||
+ org.bukkit.configuration.file.YamlConfiguration purpurConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("purpur-settings"));
|
||||
+ org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands = purpurConfiguration.getBoolean("settings.register-minecraft-debug-commands");
|
||||
+ // Purpur end
|
||||
// Paper end - load config files early for access below if needed
|
||||
|
||||
if (optionset.has("initSettings")) { // CraftBukkit
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 776d397fc31db121fa933a2ae2b4f1589fc10247..efe25d3894f3ad000257c72d9a5e06ef22446d41 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -657,4 +657,9 @@ public class PurpurConfig {
|
||||
private static void playerDeathsAlwaysShowItem() {
|
||||
playerDeathsAlwaysShowItem = getBoolean("settings.player-deaths-always-show-item", playerDeathsAlwaysShowItem);
|
||||
}
|
||||
+
|
||||
+ public static boolean registerMinecraftDebugCommands = false;
|
||||
+ private static void registerMinecraftDebugCommands() {
|
||||
+ registerMinecraftDebugCommands = getBoolean("settings.register-minecraft-debug-commands", registerMinecraftDebugCommands);
|
||||
+ }
|
||||
}
|
||||
Reference in New Issue
Block a user