Let Me Click And Send for Server
In a Nutshell
This is the server-side version of the LetMeClickAndSend mod that reverses the run_command click event restriction introduced in version 1.19.1-rc1.
Why is This Needed?
Imagine a situation: you execute a command and then click on the displayed text:
/tellraw @a {"text":"click to send \"hello\"","clickEvent":{"action":"run_command","value":"hello"}}
In vanilla Minecraft 1.19.1+, nothing happens after clicking because "hello" is not a valid command (a command must start with /).
With this mod, the message "hello" is automatically sent to the server after clicking, which matches the behavior of previous Minecraft versions.
How Does It Work?
Unlike the original LetMeClickAndSend, which changed client behavior, we implement a random 5-character server-side command generated from [0-9A-Za-z] characters to send a fake player chat message.
When we detect a "run_command" action whose value doesn't start with "/", we replace it with the generated command. This way, the client always finds a real command from the run_command action.
Returning to the previous example, we replace the value "hello" with something like "/a2xBg hello", after which the client correctly executes the command to send hello from the player.
As a result, the maximum length of the run_command action is reduced from 256 to 249 characters.
Contacts
If you encounter any problems or have suggestions, let us know on Github.
Copyright
Concept by Alex3236, development by ZhuRuoLing, Alex3236, Optijava, and HuajiMURsMC.