📡 Event Triggers
Stuff happens on your server. Your mod can react to it. Automatically.
New in v4.0 — Config lives at
config/CommandMaker/events.json
The Gist
Player joins? Fire off a welcome message. Someone dies? Announce it. First-timer connects? Give 'em a starter kit. You just write what should happen, and the mod handles the rest.
{
"events": {
"player_join": {
"commands": ["say Welcome ${player}!", "give ${player} minecraft:bread 3"]
},
"player_first_join": {
"commands": ["say EVERYONE WELCOME ${player} — it's their first time!", "give ${player} minecraft:diamond 1"]
}
}
}
All 8 Event Types
| Event | Fires when... | Extra info you get |
|---|---|---|
player_join | Someone logs in | ${player}, ${uuid}, ${x}/${y}/${z}, ${world} |
player_leave | Someone logs out | Same as join |
player_death | Someone dies | ${death_cause}, ${killer} (if another player got 'em) |
player_respawn | Someone respawns | Same as join |
player_first_join | Brand new player connects | Same as join |
player_chat | Someone sends a message | ${message} (the chat text) |
player_kill | Player kills another player | ${killer}, ${victim} |
block_break | Someone breaks a block | ${block}, ${block_x}/${block_y}/${block_z} |
Preventing Spam
Add a cooldown (in seconds) to any event so it doesn't fire back-to-back:
"player_death": {
"commands": ["say ${player} bit the dust!"],
"cooldown": 5
}
Only for Certain Blocks
Restrict block_break to specific blocks so it only triggers when someone mines the good stuff:
"block_break": {
"commands": ["give ${player} minecraft:diamond 1"],
"blocks": ["minecraft:diamond_ore", "minecraft:deepslate_diamond_ore"]
}
Commands
| Command | Does |
|---|---|
/cmd event list | See what events you've set up |
/cmd event reload | Reload after editing the config |
💡 Ideas to try: Auto-heal on respawn. Lightning strike on death. Welcome kit on first join. Chat filter that catches banned words. Diamond finder bonus. The limit is your imagination.