AutoCommands
Version 0.1.0
AutoCommands is a Minecraft Forge 1.20.1 mod It maps external TCP signals or in-game key presses to configured command sets Built for server events, minigames, external tool integration and any case where you want a signal in and a command set out It also supports binding command sets to keys for interactive and live-streaming scenarios
Quick Start
In game, press H or run /autocommand ui to open the config screen
Create a binding, for example ID demo, command /say Received: %message%, key G
Connect an external program to 127.0.0.1:8888 and send
{
"type": "event",
"timestamp": 1785588111598,
"signals": [
{
"sid": 1,
"id": "demo",
"params": { "message": "Hello" }
}
]
}
The mod writes one receipt line back
{
"type": "receipt",
"timestamp": 1785588112000,
"packet_timestamp": 1785588111598,
"status": "queued",
"receipts": [{ "sid": 1, "status": "queued" }],
"queue_size": 0,
"received_at": 1785588111600
}
You can also press the bound key to run the same command set
Configuration Example
{
"bindings": {
"demo": {
"triggerMode": "sequential",
"commands": [
{
"rawCommand": "/say Received: %message%",
"delay": 0,
"randomDelay": 0
}
],
"key": "key.keyboard.g"
}
},
"variables": {
"server_name": "AutoCommands Server"
},
"server": {
"port": 8888
}
}
Commands
| Command | Side | Description |
|---|---|---|
/autocommand ui |
Client | Open the config screen |
/autocommand reload |
Client/server | Reload the config |
/autocommand status |
Server | Show TCP state, connections, queue, and binding count |
/autocommand queue |
Server | Show pending command count |
/autocommand trigger <id> |
Server | Trigger a binding manually |
Server commands require permission level 2
Compatibility
- Minecraft 1.20.1
- Forge 47.x (47.4.16+)
- Java 17
- Client + server
Security
The TCP server listens on all interfaces and has no authentication
Anyone who can reach the port can trigger the configured commands
Those commands run with OP level 4
Use it only in single-player or on a trusted LAN
Do not expose port 8888 to the internet
Known Limitations
- TCP uses a single connection
- Manual key triggers have no external
params— variables can only come from global variables and%player_name% &&is a plain string split and does not support escaping- In a remote-server setup, client and server configs are not synced automatically
- Run
/autocommand reloadafter changing the config