Action on death
origins-powerful-powers:action_on_deathpower type
Runs actions when the holder dies. Any living entity can hold it.
| Field | Type | Default | Description |
|---|---|---|---|
entity_action | Entity action | optional | Runs on the holder. |
bientity_action | Bi-entity action | optional | Actor: the holder. Target: the killer. Skipped when there's no killer. |
bientity_condition | Bi-entity condition | optional | If set, both actions only run when it's true, and only when there's a killer. |
damage_condition | Damage condition | optional | If set, both actions only run when the killing damage matches. The amount is the damage before armor. |
- It runs after the holder has died, so the actions see a dead entity. Use it for effects on the world, the killer or scores. To save the holder, use
origins:prevent_death. - The killer is the entity credited by the damage source, such as the shooter of an arrow.
Example: "Last words". When you die to another player, they get Glowing for 30 seconds.
{
"type": "origins-powerful-powers:action_on_death",
"bientity_condition": {
"type": "origins:target_condition",
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:player"
}
},
"bientity_action": {
"type": "origins:target_action",
"action": {
"type": "origins:apply_effect",
"effect": {
"effect": "minecraft:glowing",
"duration": 600
}
}
}
}