Triggers
Triggers let a node complete automatically when a player meets a gameplay condition, without a command or API grant. Whether they run at all is controlled by config.yml > advancement.triggers-enabled, documented in Configuration.
For the page and node fields, see Advancements.
triggers.entries
Triggers are defined under a node:
triggers:
entries:
- event: "craft_item"
condition:
type: "all_of"
entries:
- '%result_type% == "CRAFTING_TABLE"'Fields:
| Field | Type | Description |
|---|---|---|
event | string | Trigger type, normalized as a CoreLib ID. |
condition | CoreLib condition group | Optional. If omitted, the event grants the node whenever it fires. |
A node may have multiple triggers; any matching trigger can grant the node.
Available triggers
For the complete shared event ID reference, see CoreLib Gameplay Event IDs. This page lists variables commonly used by EmakiCodex advancement triggers.
| event | Scenario | Variables |
|---|---|---|
entity_kill | Kill a normal entity | %entity_type% |
mythic_mob_kill | Kill a MythicMobs mob | %mythic_id%, %mythic_level% |
block_break | Break a block | %block_type% |
crop_harvest | Break a mature crop | %block_type% |
craft_item | Craft an item | %result_type%, %result_amount% |
furnace_extract | Extract a furnace result | %result_type%, %result_amount% |
player_fish | Fishing event | %fish_state% |
brew_complete | Brewing completes | %potion_type% |
entity_tame | Tame an entity | %entity_type% |
Every trigger also provides:
| Variable | Description |
|---|---|
%player% | Player name. |
%world% | Player world name. |
Trigger conditions first replace event variables, then resolve remaining PlaceholderAPI placeholders when PlaceholderAPI is installed.
Condition examples
Kill an Ender Dragon or Wither:
triggers:
entries:
- event: "entity_kill"
condition:
type: "any_of"
entries:
- '%entity_type% == "ENDER_DRAGON"'
- '%entity_type% == "WITHER"'Craft at least 16 target items:
triggers:
entries:
- event: "craft_item"
condition:
type: "all_of"
entries:
- '%result_type% == "DIAMOND_BLOCK"'
- '%result_amount% >= 16'Kill a specific MythicMobs mob:
triggers:
entries:
- event: "mythic_mob_kill"
condition:
type: "all_of"
entries:
- '%mythic_id% == "ancient_guardian"'
- '%mythic_level% >= 10'Related Pages
- Advancements: node fields and
actions.complete. - Configuration: the
advancement.triggers-enabledswitch. - Gameplay Event IDs: the complete event list on the CoreLib side.