Files
Shiroha/shiroha-server/minecraft-patches/features/0033-Add-config-to-support-for-long-command-inputs.patch
T

22 lines
1.3 KiB
Diff
Raw Normal View History

2026-07-09 00:03:09 +08:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Wed, 8 Jul 2026 21:53:18 +0800
Subject: [PATCH] Add config to support for long command inputs
Some long commands can be run through the dialog command, but paper has prohibited it.
Revert to vanilla to fix it.
diff --git a/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java b/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
2026-07-14 15:09:17 +08:00
index 491af2413a4e793a121fec368259ff8211ed031e..5e235767cdd21ee9b3706eb8635e383dad139dc3 100644
2026-07-09 00:03:09 +08:00
--- a/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
+++ b/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
@@ -12,7 +12,7 @@ public record ServerboundChatCommandPacket(String command) implements Packet<Ser
);
private ServerboundChatCommandPacket(final FriendlyByteBuf input) {
- this(input.readUtf(MAX_CHAT_PACKET_INPUT_SIZE)); // Paper - limit chat command inputs
2026-07-14 12:22:17 +08:00
+ this(io.nanachiyo0721.shiroha.config.modules.fixes.LongCommandSupportConfig.enabled ? input.readUtf() : input.readUtf(MAX_CHAT_PACKET_INPUT_SIZE)); // Paper - limit chat command inputs // Shiroha - Add config to support for long command inputs
2026-07-09 00:03:09 +08:00
}
private void write(final FriendlyByteBuf output) {