+:
+onSpawn.
The on is optional — +hurt and +onHurt are the same trigger. Write whichever reads better.
Why
+ and not #? # is YAML’s comment character. Older versions accepted #onHurt, and it only worked because the loader quotes list items before YAML ever sees them. One hand-edit that broke that quoting turned a whole effect line into a comment, silently. + has no such meaning in YAML.# and ~ still parse, so existing files keep working, and they are rewritten to + automatically the next time the file loads. Nothing to migrate by hand.Available triggers
An addon can add more: see Extending the Effect Language.
Triggers set the target
Each trigger defines who@target points to. That’s what makes lines like these work:
+onSpawnhas no target. A spawn isn’t caused by any entity, so@targetresolves to nothing there. Use@self,@playersRadius[N]or@worldinstead.- The target can be empty even on other triggers. A mob that dies to fall damage has no killer, so an
+onDeath @targetline simply does nothing. Environmental damage on+onHurtbehaves the same way.
One trigger, many lines
Multiple lines can share a trigger. They run in order:Where triggers apply
Triggers only exist on a mob’seffects: list. Lines inside named effects never carry a trigger of their own: they inherit the moment they were called from. The run line has the trigger, the named effect just executes.

