Download Let Me Click And Send — Minecraft Mods — MetaMods
Let Me Click And Send

Let Me Click And Send

Active

Downloads

0

Last update

3 months ago

Versions

1.19.1 — 1.21.7
Client
Fabric
Forge
Neoforge
Utils

Let Me Click And Send

A simple client-side mod for Minecraft that removes the run_command click event restriction introduced in version 1.19.1-rc1. Now, non-command messages can once again be freely sent to chat via the run_command click event.

Version Comparison

If you need a solution that doesn't require installation on player clients, there is a server-side version of the mod that performs the same function.

Mod Side Advantages Disadvantages
LetMeClickAndSend client Completely identical behavior to versions before mc1.19.1 Requires installation on all player clients
LetMeClickAndSendForServer server No installation required on clients Reduces maximum chat message length by 7 characters

Usage Example

Execute the following command, then click on the displayed text:

# Minecraft [1.7, 1.21.5)
/tellraw @a {"text":"click me to send \"hi\"","clickEvent":{"action":"run_command","value":"hi"}}

In vanilla Minecraft 1.19.1 ~ 1.21.4, after clicking, you won't be able to say anything because hi is not a valid command (doesn't start with /).

With this mod, after clicking, you will automatically send a hi message to the server chat, which matches the behavior of previous Minecraft versions.

Changes in MC 1.21.5+

Starting from MC version 1.21.5, the behavior of run_command has changed significantly.

The first change concerns command syntax and has minor impact:

# Minecraft [1.21.5, ~)
/tellraw @a {"text":"click me to send \"hi\"","click_event":{"action":"run_command","command":"hi"}}

The second change is more substantial:

  • The command value is always considered valid, regardless of whether it starts with / or not
  • The client automatically removes the / prefix from the command value and sends the remaining string as a command

It's now impossible to correctly distinguish between "run_command for sending chat messages" and "run_command for sending commands".

As a workaround, LetMeClickAndSendForServer for MC >= 1.21.5 replaces certain command values with the /lmcas command. By default, only command values starting with !! are replaced, which is a common command prefix in the MCDReforged plugin ecosystem.

For customizing the replacement behavior, a configuration file has been added at ./config/letmeclickandsendforserver/config.json:

{
    "sendChatPattern": "!!.*"
}

The sendChatPattern parameter should contain a valid regular expression. All command values that fully match the pattern will be sent as chat messages.

To test with default settings, use:

/tellraw @a {"text":"click me to send \"!!MCDR\"","click_event":{"action":"run_command","command":"!!MCDR"}}

Requirements

This is an exclusively client-side mod that requires no additional dependencies.

Minimum requirements:

  • Minecraft version 1.19.1 and above
Project members
fallen-breath

fallen-breath

Developer

Fallen_Breath

Fallen_Breath

Created: 29 Oct 2022

ID: 59910