Let Me Click and Send for Server
TL;DR
LetMeClickAndSend 的服务端版本,用于逆转在 1.19.1-rc1 中引入的 run_command 点击事件限制。
Why?
例如,我们执行以下命令然后点击显示出的文本:
/tellraw @a {"text":"click me to send \"hi\"","clickEvent":{"action":"run_command","value":"hi"}}
在原版 1.19.1+ 中,你无法通过点击发送任何内容,因为 hi 不是一个有效的命令(命令必须以 / 开头)。
使用此模组后,点击后会自动向服务器发送一条 hi 消息,这与 Minecraft 早期版本的行为一致。
How?
与更改客户端行为的原版 LetMeClickAndSend 不同,我们引入了一个由 [0-9A-za-z] 生成的随机 5 位服务端命令,用于发送假玩家聊天。
如果我们检测到某个 "run_command" 动作的值不以 "/" 开头,我们会将其替换为生成的命令。这样客户端就能从 run_command 动作中找到一个真实的命令。
继续使用前面的示例,我们将值 "hi" 替换为类似 "/a2xBg hi" 的内容,然后客户端会正确执行它,从而以玩家身份发送 hi。
因此,run_command 动作的最大长度从 256 减少到了 249。
Contact
如果你有任何问题或建议,请通过 Github 告知我们。
Copyright
概念设计由 Alex3236 提供,作者包括 ZhuRuoLing、Alex3236、Optijava 和 HuajiMURsMC。
Let Me Click and Send for Server
TL;DR
Server-side version of LetMeClickAndSend that reverses the run_command click event restriction introduced in 1.19.1-rc1.
Why?
For example, we run the following command and then click on the displayed text:
/tellraw @a {"text":"click me to send \"hi\"","clickEvent":{"action":"run_command","value":"hi"}}
In vanilla 1.19.1+ you cannot say anything after clicking because hi is not a valid command (a command shall start with /).
With this mod, you will automatically send a hi message to the server after clicking, which is the same behavior as previous versions of Minecraft.
How?
Unlike the original LetMeClickAndSend, which changed the client behavior, we introduce a random 5-character server-side command generated from [0-9A-za-z] to send a fake player chat.
If we detect a "run_command" action whose value doesn't start with "/", we replace it with the generated command. This way the client will always find a real command from the `run_command' action.
Still using the previous example, we would replace the value "hi" with something like "/a2xBg hi", then client would correctly execute it to send hi from player.
As a result, the maximum length of the `run_command' action is reduced from 256 to 249.
Contact
If you have any problems or suggestions, please let us know on Github.
Copyright
Concept by Alex3236, Authored by ZhuRuoLing, Alex3236, Optijava and HuajiMURsMC.
评论 0
登录后参与评分
还没有评论,来抢沙发吧