Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.22 KB

minecraftTrigger_on_hurt_by_player.md

File metadata and controls

45 lines (34 loc) · 1.22 KB
author ms.author title description ms.service
iconicNurdle
mikeam
Entity Documentation - minecraft:on_hurt_by_player
A reference document detailing the 'on_hurt_by_player' entity trigger
minecraft-bedrock-edition

Entity Documentation - minecraft:on_hurt_by_player

minecraft:on_hurt_by_player adds a trigger to call when this entity takes damage by a player.

Parameters

Name Default Value Type Description
event not set String The event to run when the conditions for this trigger are met.
filters not set Minecraft Filter The list of conditions for this trigger to execute.
target self String The target of the event.

Example

"minecraft:on_hurt_by_player":{
    "event": "minecraft:ow",
    "filters": "has_target",
    "target": "self",
}

Vanilla entities examples

blaze

"minecraft:on_hurt_by_player": {
    "event": "minecraft:on_hurt_event",
    "target": "self"
}

Vanilla entities using minecraft:on_hurt_by_player