Callback Power Granted
Invokes an action upon granting the power to the entity.
Type ID: kaya:callback/power/granted
Format
| Field | Type | Default | Description |
|---|---|---|---|
action |
Action | The action to invoke after the power is granted to the entity. |
Example
{
"type": "kaya:callback/power/granted",
"action": {
"type": "kaya:execute_command",
"source": {
"type": "kaya:entity",
"entity": "this"
},
"command": "tag @s add init"
}
}
This example adds an init tag to the entity after the power is granted. The tag will only be added once, unless the power is revoked and granted again.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |