Skip to content

Configuration

SicklySurgeon edited this page Oct 28, 2026 · 2 revisions

Configuration

config.yml controls what the plugin shows. The text itself lives in messages.yml — see Messages & Groups.

The file is created on first start at plugins/CustomDeathMessages/config.yml. After editing, run /cdm reload (or restart).

Validation

Key Default Description
ignore-validation-errors false If true, a reload continues even when validation finds errors
run-initial-validation true Validates sounds, particles, modes and conditions on startup
log-death-messages true Writes each final death message to the console

/cdm config validate (or /cdmconfig validate) runs the same checks on demand. With ignore-validation-errors: false, a reload with errors is aborted and the old configuration stays active.

Message targeting

Key Default Description
message-to-victim true Send the message to the player who died
message-to-world true Send it to every player in the same world
message-to-radius 0 If greater than 0, send only to players within this many blocks. Overrides message-to-world

If message-to-radius is 0 and message-to-world is false, only the victim receives the message (when message-to-victim is true).

Sounds

Key Default Description
play-sound-on-death true Play a sound when a player dies
death-sound entity.player.death Sound key
sound-volume 1.0 Volume
sound-pitch 1.0 Pitch

Sound values accept both formats:

  • Namespaced key: entity.player.death, minecraft:entity.wither.spawn
  • Spigot constant: ENTITY_LIGHTNING_BOLT_THUNDER, ENTITY_WITHER_SPAWN

Invalid sounds fall back to entity.player.death and log a warning.

Legacy sound keys

sound-broadcast-mode and sound-broadcast-radius are kept for old configurations. They are only used when effects-broadcast.sound-mode / sound-radius are absent; the new keys take priority.

Particles

Key Default Description
play-particles-on-death true Spawn particles at the death location
death-particle EXPLOSION Particle name (EXPLOSION, EXPLOSION_EMITTER, CLOUD, SOUL...)
particle-count 50 Number of particles
particle-offset-x/y/z 0.5 Spread on each axis
particle-extra 0.1 Extra data (usually speed)

Legacy keys: particle-broadcast-mode, particle-broadcast-radius (only used when the effects-broadcast equivalents are absent).

Titles and action bars

Key Default Description
play-title-on-death false Show a title and subtitle
death-title &cYOU DIED Title text
death-subtitle &7Cause: {cause} Subtitle text
play-actionbar-on-death false Show an action bar message
death-actionbar &c{victim} has perished! Action bar text

Titles, subtitles and action bars accept colors and placeholders.

Darken-screen effect

Key Default Description
play-darken-screen-effect false Enable the effect
darken-effect-duration-ticks 20 Duration in ticks (20 = 1 second)
darken-effect-particle CLOUD Particle used for the effect

Broadcast modes (effects-broadcast)

Each effect decides who receives it:

Mode Recipients
GLOBAL Every player on the server
WORLD Every player in the victim's world
RADIUS Players within the configured radius
VICTIM_ONLY Only the player who died

VICTIM is accepted as an alias of VICTIM_ONLY.

effects-broadcast:
  default-mode: WORLD
  default-radius: 50

  sound-mode: WORLD
  sound-radius: 50

  particle-mode: WORLD
  particle-radius: 50

  title-mode: VICTIM_ONLY
  title-radius: 0

  actionbar-mode: VICTIM_ONLY
  actionbar-radius: 0

  darken-effect-mode: RADIUS
  darken-effect-radius: 30

Resolution order for each effect:

  1. effects-broadcast.<effect>-mode / effects-broadcast.<effect>-radius
  2. Legacy sound-broadcast-mode / particle-broadcast-mode (sound and particles only)
  3. effects-broadcast.default-mode / effects-broadcast.default-radius

The radius is only used by RADIUS.

Time and respawn

Key Default Description
time-format HH:mm:ss Java DateTimeFormatter pattern used by {time}
respawn-message-enabled true Enable the respawn broadcast
respawn-message &a{player} has respawned! Respawn text ({player})

Examples for time-format: HH:mm:ss, hh:mm a, HH:mm.

Epic deaths

Key Default Description
epic-death-chance 0.05 Probability from 0.0 to 1.0 (0.05 = 5%). Values outside the range are clamped

When an epic death triggers, the plugin uses epic-messages and epic-effects from messages.yml, and strikes lightning at the death location.

Economy

Key Default Description
cost-per-death-message 0.0 Amount charged through Vault on each death. 0 disables the cost
exempt-groups-from-cost [admin] Groups that never pay (default, vip, admin)

Requires Vault and an economy plugin. If the player cannot afford the cost, the custom message is skipped and the vanilla death message is used instead.

Per-world messages

per-world-messages:
  world_nether:
    default: "&c{victim} &4died in the Nether."
  world_the_end:
    default: "&5{victim} &dwas lost to the void."

A configured world uses this single message for every death, before groups, causes and epic deaths. Remove the entry to fall back to normal selection.

Groups and colors

Key Default Description
use-permission-based-messages true Select the vip / admin message groups by permission. When false, everyone uses default
legacy-color-support false If true, hex codes are removed instead of converted. Only for Minecraft 1.15 or older

Group permissions are cdm.message.vip and cdm.message.admin (admin takes precedence). On the modern build leave legacy-color-support at false to render hex colors. On the legacy build it only matters for servers older than 1.16: hex colors are then approximated with the closest legacy color, or removed entirely when this option is true.

Default file

The full default config.yml ships inside the JAR and is also available at src/main/resources/config.yml.