mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@73d218c1 Improve command permission lookups PaperMC/Paper@7c2ffd5e Prune the api version suffix PaperMC/Paper@c609d6dc Remove SERVER_ONLY command flag functionality PaperMC/Paper@3594d24a Properly send over SADDLE and BODY equipment items to PlayerInventory PaperMC/Paper@720e63ff Remove craft flying PaperMC/Paper@1e441025 Removed inlined art api PaperMC/Paper@adb5aefc Add api for shear equippable logic PaperMC/Paper@4604c5f2 Change ordering on YamlSanitizationTest PaperMC/Paper@c986ce54 Fix V4307 ordering issues PaperMC/Paper@48e94e8c fix sponge absorb resetting block entity data of waterlogged blocks PaperMC/Paper@c5fc0dc8 support block state mutation of already placed block entity in BlockStateListPopulator
44 lines
2.7 KiB
Diff
44 lines
2.7 KiB
Diff
--- a/net/minecraft/commands/Commands.java
|
|
+++ b/net/minecraft/commands/Commands.java
|
|
@@ -251,7 +_,7 @@
|
|
JfrCommand.register(this.dispatcher);
|
|
}
|
|
|
|
- if (SharedConstants.IS_RUNNING_IN_IDE) {
|
|
+ if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands || SharedConstants.IS_RUNNING_IN_IDE) { // Purpur - register minecraft debug commands
|
|
RaidCommand.register(this.dispatcher, context);
|
|
DebugPathCommand.register(this.dispatcher);
|
|
DebugMobSpawningCommand.register(this.dispatcher);
|
|
@@ -279,6 +_,14 @@
|
|
StopCommand.register(this.dispatcher);
|
|
TransferCommand.register(this.dispatcher);
|
|
WhitelistCommand.register(this.dispatcher);
|
|
+ org.purpurmc.purpur.command.CreditsCommand.register(this.dispatcher); // Purpur - Add credits command
|
|
+ org.purpurmc.purpur.command.DemoCommand.register(this.dispatcher); // Purpur - Add demo command
|
|
+ org.purpurmc.purpur.command.PingCommand.register(this.dispatcher); // Purpur - Add ping command
|
|
+ org.purpurmc.purpur.command.UptimeCommand.register(this.dispatcher); // Purpur - Add uptime command
|
|
+ org.purpurmc.purpur.command.TPSBarCommand.register(this.dispatcher); // Purpur - Implement TPSBar
|
|
+ org.purpurmc.purpur.command.CompassCommand.register(this.dispatcher); // Purpur - Add compass command
|
|
+ org.purpurmc.purpur.command.RamBarCommand.register(this.dispatcher); // Purpur - Add rambar command
|
|
+ org.purpurmc.purpur.command.RamCommand.register(this.dispatcher); // Purpur - Add ram command
|
|
}
|
|
|
|
if (selection.includeIntegrated) {
|
|
@@ -537,6 +_,7 @@
|
|
private void runSync(ServerPlayer player, java.util.Collection<String> bukkit, RootCommandNode<CommandSourceStack> rootCommandNode) {
|
|
// Paper end - Perf: Async command map building
|
|
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API
|
|
+ if (org.bukkit.event.player.PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Purpur - Skip events if there's no listeners
|
|
org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit));
|
|
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
|
|
|
@@ -547,6 +_,8 @@
|
|
}
|
|
}
|
|
// CraftBukkit end
|
|
+ } // Purpur - Skip events if there's no listeners
|
|
+
|
|
player.connection.send(new ClientboundCommandsPacket(rootCommandNode, COMMAND_NODE_INSPECTOR));
|
|
}
|
|
|