Files
Shiroha/shiroha-server/minecraft-patches/features/0035-Add-config-to-support-for-long-command-inputs.patch
T
NanaChiyo0721 f631903000
Shiroha CI / build (push) Canceled after 0s
Shiroha CI / Event File (push) Canceled after 0s
Reduce allocation in PoiAccess
2026-08-05 23:57:15 +08:00

22 lines
1.3 KiB
Diff

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
index 491af2413a4e793a121fec368259ff8211ed031e..5e235767cdd21ee9b3706eb8635e383dad139dc3 100644
--- 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
+ 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
}
private void write(final FriendlyByteBuf output) {