User Guides

Built-in Events

Run Shogi rules in response to built-in gameplay events.

shogi:on_death

shogi:on_death is evaluated on the server whenever a living entity dies. The dying entity is used as the rule context, so entity, position, and world conditions describe that entity and the place where it died.

For example, this rule adds a cooldown when a player dies, which you could then later query elsewhere:

config/shogi.rules.json
{
  "shogi:on_death": [
    "is_player -> add_cooldown('death', '5m')"
  ]
}

The event applies to every LivingEntity, not only players. Use conditions such as is_player, has_entity_tag, is_dimension, or is_biome to select the deaths that should trigger an action.

config/shogi.rules.json
{
  "shogi:on_death": [
    "is_player + is_dimension('minecraft:the_nether') -> add_cooldown('nether_death', '10m')"
  ]
}
This event observes a death; it cannot cancel or prevent it. The rule's result is ignored, so configure actions with side effects rather than return-only outcomes such as true, failure(...), or refuse(...).

Datapack configuration

Instead of the global config file, a datapack can define this event at:

data/shogi/shogi/rules/on_death.json

The file contains the rule payload directly, without the surrounding shogi:on_death property:

data/shogi/shogi/rules/on_death.json
[
  "is_player -> add_cooldown('death', '5m')"
]

For the conditions and actions that can be used in an event rule, see Available Effects.