Skip to main content

Hurt Player

The arc:on_hurt_player action type is triggered when a player hurts another player.

Action Data

When this action is triggered, the following action data is made available to be used by conditions and rewards:

Action Data TypeDescription
arc:entityRepresents an entity in the game, such as a player, mob, or item.
arc:damageAmountQuantifies the amount of damage dealt or received in an action.

Example

The following example will give the player a Strength I effect for 10 seconds every time they hurt another player.

data/my_datapack/arc/strength_on_hurt_player.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_hurt_player",
"conditions": [],
"rewards": [
{
"type": "arc:effect",
"effect": {
"id": "minecraft:strength",
"duration": 200,
"amplifier": 0,
"show_particles": false,
"show_icon": false
}
}
]
}

Compatible Condition Types

The following condition types can be used with this action type:

Compatible Reward Types

The following reward types can be used with this action type: