Skip to content

Messages and Groups

SicklySurgeon edited this page Oct 27, 2026 · 1 revision

Messages & Groups

messages.yml controls what the plugin says. config.yml controls when and where — see Configuration.

The file lives at plugins/CustomDeathMessages/messages.yml. Edit it and run /cdm reload.

File structure

Section Purpose
epic-messages Random messages for epic deaths
epic-effects Sound, particle, count, title and subtitle for epic deaths
conditional-messages Messages that depend on placeholders (distance, biome, effects...)
groups Message sets for default, vip and admin
system-messages Feedback for commands, reloads, validation and the economy
help-system Text used by /cdm help and /cdmhelp
update-notifications Update message for the console and for staff

Groups

Three groups are built in:

Group Selected by Typical use
default Everyone else Standard messages
vip Permission cdm.message.vip Donor / rank messages
admin Permission cdm.message.admin Staff messages

admin has priority over vip. Group selection only happens when use-permission-based-messages: true is set in config.yml; otherwise everyone uses default.

Each group supports:

groups:
  default:
    default-messages:            # string or list; list entries are chosen at random
      - "&c{victim} has met their end."
      - "&4{victim} just became a statistic."
    cause-messages:
      ENTITY_ATTACK:             # Bukkit DamageCause name
        - "&c{victim} &4was massacred by &c{killer_name}&4."
      FALL: "&c{victim} forgot how to fly."

A group can also override the death sound:

  vip:
    death-sound: entity.player.levelup
    sound-volume: 1.2
    sound-pitch: 1.5

When a list is used, the plugin avoids repeating the same entry twice in a row for the same player.

Cause names

Use the Bukkit DamageCause enum name, in any case (fall and FALL are both accepted). Common values:

ENTITY_ATTACK, ENTITY_SWEEP_ATTACK, PROJECTILE, FALL, FIRE, FIRE_TICK,
LAVA, DROWNING, SUFFOCATION, VOID, MAGIC, WITHER, POISON, STARVATION,
FALLING_BLOCK, BLOCK_EXPLOSION, ENTITY_EXPLOSION, LIGHTNING, CONTACT,
CRAMMING, DRAGON_BREATH, FLY_INTO_WALL, HOT_FLOOR, MELTING, SONIC_BOOM,
FREEZE, WORLD_BORDER, CAMPFIRE, THORNS

Invalid causes are ignored; the plugin falls back to default-messages.

Selection order

  1. per-world-messages.<world>.default from config.yml
  2. Epic death (if it triggers) → random entry from epic-messages
  3. Conditional message for the group and cause (first matching condition, then its default)
  4. cause-messages.<CAUSE> for the group
  5. default-messages for the group
  6. Hardcoded &c{victim} has died.

Conditional messages

Conditions let one cause have several outcomes:

conditional-messages:
  default:
    messages:
      ENTITY_ATTACK:
        - condition: "{distance} > 10"
          message: "&c{victim} &4was sniped by &c{killer_name}&4 from {distance} blocks away!"
        - condition: "{victim_effects} contains 'Poison'"
          message: "&c{victim} &2died poisoned by &c{killer_name}&2!"
        - default: "&c{victim} &4was eliminated by &c{killer_name}&4 using {killer_source}."

Rules:

  • The left side must be a placeholder in braces: {distance}, {biome}, {victim_effects}...
  • Supported operators: >, <, >=, <=, equals, contains, startswith, endswith.
  • Quote text values with single quotes: "{biome} equals 'Nether Wastes'".
  • Combine clauses with AND / OR (case-insensitive). AND binds tighter than OR.
  • Text comparisons are case-sensitive.
  • The first matching condition wins. If none match, the entry with default is used.
  • If a cause has no conditional entries, the normal cause-messages and default-messages are used.
  • Conditional messages are looked up per group: conditional-messages.<group>.messages.<CAUSE>.

More examples:

      FALL:
        - condition: "{distance} > 30"
          message: "&c{victim} &4fell from the sky!"
        - default: "&c{victim} &4forgot that gravity exists."
      FIRE:
        - condition: "{biome} equals 'Nether Wastes'"
          message: "&c{victim} &4was consumed by the Nether's eternal flames."
        - condition: "{world} equals 'world_nether' AND {distance} > 5"
          message: "&c{victim} &4burned far from home."
        - default: "&c{victim} &4turned into a human torch."

Epic deaths

epic-messages:
  - "&6&l!!! EPIC DEATH !!! &e{victim} &6was annihilated by &e{killer_name}&6!"
  - "&4&l!!! APOCALYPSE !!! &c{victim} &4vanished by &c{killer_name}&4!"

epic-effects:
  sound: "ENTITY_LIGHTNING_BOLT_THUNDER"
  particle: "EXPLOSION_EMITTER"
  particle-count: 100
  title: "&6&lEPIC DEATH!"
  subtitle: "&e{victim} died in style!"

Triggered by epic-death-chance in config.yml (default 5%). A random epic-messages entry is used, the epic sound/particles/title replace the normal ones, and lightning strikes at the death location.

Colors

  • & codes: &c, &a, &l, &r...
  • Hex: &#FF5555 or <#FF5555>

Example inside any message:

death-title: "<#FF5555>YOU DIED &8« &7{cause}"

System messages

Feedback text lives under system-messages and help-system. They support colors and hex, plus contextual values such as {error}, {version}, {player} and {cost}.

Update notifications

update-notifications:
  log: "&a[CustomDeathMessages] New version available! Current: {current_version}, New: {new_version}. View at: {project_url}"
  player: "&e[CustomDeathMessages] &aNew version available! &fCurrent: {current_version}, New: {new_version}. View at: {project_url}"

The console message is written when an update is found. The player message is sent on join to players with cdm.admin (or OPs).

Clone this wiki locally