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 Type | Description |
---|---|
arc:entity | Represents an entity in the game, such as a player, mob, or item. |
arc:damageAmount | Quantifies 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:
🌍 Dimension
👤🧱 Entity In Block
👤 Entity Type
👥 Entity Types
🪙✅ Item Equipped
🪙✋ Item In Hand
🪙📦 Item In Inventory
🚫 NOT
🔀 OR
✂️🐑 Ready For Shearing
📋 Scoreboard
👥 Team
Compatible Reward Types
The following reward types can be used with this action type: