📡 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

EventFires when...Extra info you get
player_joinSomeone logs in${player}, ${uuid}, ${x}/${y}/${z}, ${world}
player_leaveSomeone logs outSame as join
player_deathSomeone dies${death_cause}, ${killer} (if another player got 'em)
player_respawnSomeone respawnsSame as join
player_first_joinBrand new player connectsSame as join
player_chatSomeone sends a message${message} (the chat text)
player_killPlayer kills another player${killer}, ${victim}
block_breakSomeone 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

CommandDoes
/cmd event listSee what events you've set up
/cmd event reloadReload 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.