When an event occurs in the game, this command catches and executes specified actions.
Usage:
- `/hook `
- Executes `` when `` occurs. You can use "execute" or "function" here!
- `/hook prevent`
- Prevents the specified `` from occurring.
Examples:
Summon lightning to someone trying to break a diamond block!
`/hook minecraft:block_event.destroying.minecraft:diamond_block summon minecraft:lightning_bolt ~ ~ ~`
Prevent explosions:
`/hook minecraft:explode_event.subject prevent`
Proposed events:
- Item
- `minecraft:item_event.use` = user right-click
- `minecraft:item_event.attack` = user left-click
- Entity spawn
- `minecraft:entity_spawn.entity` = spawned entity
- `minecraft:entity_spawn.subject` = initiator (may not exist or be applicable for natural spawns)
- `minecraft:entity_spawn.(entity name)` = entity-specific initiator
- Attacks
- `minecraft:attack_event.attacker` = attacker
- `minecraft:attack_event.victim` = victim
- Blocks
- `minecraft:block_event.start_destroy.(block name)` = start of destruction
- `minecraft:block_event.destroying.(block name)` = during destruction
- `mimecraft:block_event.destroyed.(block name)` = after destruction
- Explosions
- `minecraft:explode_event.subject` = entity causing explosion
- `minecraft:explode_event.victim` = person directly hit by the explosion
Translated by ChatGPT.
Sorry. cause my English skills are suks.
Please sign in to leave a comment.
2 Comments