{
"trigger": string // one of the triggers mentioned below
"predicate": {
// trigger-specific properties
},
"actions": [
{
"action": string // one of "function", "advancement", ...
"context": string //one of "this", "killer", "victim", ...
}
]
}
List of triggers and their properties. Some of these are the same as advancements triggers.
useorattack: Triggered when a player uses or attacks with an item <-bred_animals,cured_zombie_villager,filled_bucket,slept_in_bed,used_ender_eye,used_totemitem: The item that the player usedentity: The player that triggered the eventduration: The minimum duration that the player has to hold the use buttonvictim: In case the target was an entityblock: In case the target was a block
place_block: Triggered when a player places a block <-placed_blockitem: The item that was placedblock: The resulting block that was placedentity: The player that placed the blocklocation: The location of the block
break_block: Triggered when a player breaks a blockblock: The block that was brokentool: The item used to break the blockentity: The player that broke the blocklocation: The location of the block
hurt_entityorkill_entity: Triggered when an entity got hurt <-entity_hurt_player,player_hurt_entity,killed_by_crossbowattacker: The entity that attacked an entityvictim: The entity that got hurt by an entitydamage: The damage properties
inventory_changeddimension_changedenter_block- ...