Death Control

MythicRPG's Death Control system replaces vanilla death handling with three configurable layers:

  • Drop Rules — pick which inventory slots drop on death and override that decision per-item with KeepFilters and DropFilters.
  • Experience Loss Rules — control how much archetype XP and vanilla XP a player loses on death, with separate floors for each.
  • Graveyards — define respawn points and pick the best one for each death (priority + closest match).

All three are independent. You can use one without the others — for example, drop nothing on death but still send the player to a graveyard.

Where to configure

DropRules and ExperienceLoss live in config-rpg.yml under Configuration.Profiles.DeathControl. Graveyards live in pack files at <pack>/graveyards/*.yml and are managed at runtime with the graveyards command.

Configuration:
  Profiles:
    DeathControl:
      DropRules:
        Default:
          DropArmor: true
          DropHotbar: true
          DropMainInventory: true
          DropOffhand: true
          KeepFilters: []
          DropFilters: []
      ExperienceLoss:
        Default:
          RPGPercent: 0
          RPGFlat: 0
          RPGLevelFloor: 0
          VanillaPercent: 1.0
          VanillaFlat: 0
          VanillaLevelFloor: 0
          DropVanillaXp: true

The Default block under either section is the fallback for every player. You can add named override blocks alongside Default — when the player dies, the highest-priority override whose Conditions: match is selected; if no override matches, Default applies.

Drop Rules

Each rule decides which slots drop on death, then lets you override that per-item.

DropRules:
  Default:
    DropArmor: true
    DropHotbar: true
    DropMainInventory: true
    DropOffhand: true
    KeepFilters: []
    DropFilters: []
    Priority: 0
    Conditions: []
  Hardcore:
    DropArmor: true
    DropHotbar: true
    DropMainInventory: true
    DropOffhand: true
    KeepFilters:
    - 'MythicItem: SOULBOUND_*'      # never drop soulbound items
    DropFilters:
    - 'NbtTag: cursed'               # always drop "cursed" items, even from kept slots
    Priority: 10
    Conditions:
    - archetype{group=class;type=hardcore}
Option Description Default
DropArmor Drop the four armor slots on death. true
DropHotbar Drop hotbar slots (0–8). true
DropMainInventory Drop the main inventory (slots 9–35). true
DropOffhand Drop the offhand item. true
KeepFilters List of filter lines. Items matching any KeepFilter are always kept, regardless of slot setting. []
DropFilters List of filter lines. Items matching any DropFilter are always dropped, regardless of slot setting (KeepFilter wins on conflict). []
Priority Higher priorities are checked first. The first override whose Conditions: match wins. Default is internally pinned to last. 0
Conditions List of Mythic conditions that must all match the dying player for this rule to apply. []

Per-item resolution order

For each item in the player's inventory:

  1. If a KeepFilter matches → kept (returned on respawn).
  2. Else if a DropFilter matches → dropped.
  3. Else the slot's drop toggle decides.

KeepFilter always beats DropFilter on the same item — write filters knowing that "keep" is the conservative answer.

Filter Syntax

Filters are written as a single line of the form Type: comma,separated,values. Three filter types are supported:

Type What it matches Example
Material Vanilla material names (case-insensitive). Multiple comma-separated. Material: DIAMOND_SWORD, NETHERITE_CHESTPLATE
MythicItem Mythic item ids. Trailing * is a prefix wildcard (e.g. LEGENDARY_*). Items that aren't Mythic items are ignored by this filter. MythicItem: SOULBOUND_RING, LEGENDARY_*
NbtTag Persistent-data-container key (any namespace). Matches any item that has the given key on its meta. NbtTag: cursed

A malformed filter line is logged and skipped — it does not break the rest of the rule.

Trigger

When a drop rule applies, MythicRPG fires the ~onDeathDropsFiltered trigger on the dying profile. Variables: keptItems, forcedItems, and drop-rule (the rule id that matched).

Experience Loss Rules

Each rule controls archetype XP loss, vanilla XP loss, and whether vanilla XP orbs spawn.

ExperienceLoss:
  Default:
    RPGPercent: 0.10            # lose 10% of banked archetype xp
    RPGFlat: 0
    RPGLevelFloor: 1            # never go below archetype level 1
    VanillaPercent: 0.5         # lose half of vanilla level
    VanillaFlat: 0
    VanillaLevelFloor: 0
    DropVanillaXp: false        # don't spawn xp orbs
    Priority: 0
    Conditions: []
Option Description Default
RPGPercent Fraction of the archetype's banked XP to lose (01). Combines additively with RPGFlat. 0
RPGFlat Flat XP amount to lose on top of the percent. 0
RPGLevelFloor The archetype's level will not be reduced below this floor — XP loss stops once the level reaches it. 0
VanillaPercent Fraction of the player's vanilla level to lose (01). 1.0 reproduces vanilla MC behavior (lose all levels). Combines additively with VanillaFlat. 1.0
VanillaFlat Flat number of vanilla levels to lose on top of the percent. 0
VanillaLevelFloor The player's vanilla level will not be reduced below this floor. 0
DropVanillaXp Whether vanilla XP orbs spawn at the death location for the lost levels. true
Priority Higher priorities are checked first. Default is pinned to last. 0
Conditions List of Mythic conditions that must all match for this rule to apply. []

If VanillaPercent: 0 AND VanillaFlat: 0, the player keeps all vanilla XP (and no orbs spawn regardless of DropVanillaXp). If both RPGPercent: 0 AND RPGFlat: 0, archetype XP is preserved.

Trigger

When an XP-loss rule applies, MythicRPG fires the ~onExperienceLost trigger. Variables: rpgLost, vanillaLevelLost, and xp-rule (the rule id that matched).

Graveyards

A graveyard is a respawn point with optional conditions. When a player dies, MythicRPG picks one based on:

  1. Filter to graveyards in the same world as the death location whose target world is loaded.
  2. Filter by the rule's Conditions: matching the dying profile.
  3. Sort by Priority (highest first), then by distance to the death location (closest first).
  4. The first match wins. If no graveyard matches, vanilla respawn behavior is used.

Graveyards are stored in pack files; the simplest workflow is to use the in-game commands.

Graveyard YAML format

SpawnTown:
  World: world
  X: 100.5
  Y: 64.0
  Z: -200.5
  Yaw: 90.0
  Pitch: 0.0
  Priority: 0
  Conditions: []
DesertOutpost:
  World: world
  X: 1500.5
  Y: 70.0
  Z: 800.5
  Priority: 10
  Conditions:
  - archetype{group=race;type=desertfolk}
Option Description Default
World The world this graveyard lives in. Required; if the world is unloaded the graveyard is skipped. required
X / Y / Z Spawn coordinates. required
Yaw Yaw rotation of the spawned player. 0
Pitch Pitch rotation of the spawned player. 0
Priority Higher priorities are picked first. 0
Conditions Mythic conditions that must match the dying profile. []

Graveyard Commands

Command Description
/mythicrpg graveyards create [id] <file> Save the spot you're standing on as a graveyard. <file> is the target YAML (e.g. graveyards.yml or pack:vanilla/graveyards.yml).
/mythicrpg graveyards delete [id] Remove a graveyard by id.
/mythicrpg graveyards list <world> List loaded graveyards (optionally filter to a single world).
/mythicrpg graveyards tp [id] Teleport to a graveyard's location.

Aliases: graveyard, gy (e.g. /mythicrpg gy list world).

All four require the mythicrpg.command.admin permission.

Trigger

When a player respawns at a graveyard, MythicRPG fires the ~onRespawnAtGraveyard trigger with the variable graveyard set to the matched graveyard id.

Updated Aug 19, 2026