Custom Death Messages

Where you can create custom death messages!

Supported Versions:

26.1.2+

Tutorial Steps:

  1. Use row 2 command block 1 for death messages for any deaths
  2. Use row 2 command block 2 for death messages to be based on mob distance
  3. Use row 2 command block 3 for death messages using the death scoreboard based on mobs (requires additional scoreboards and resets)

Commands by Row:

Row 1

1. [impulse] /scoreboard objectives add death deathCount
2. [chain] /scoreboard objectives add creeperDeath minecraft.killed_by:minecraft.creeper
3. [chain] /gamerule show_death_messages false

Row 2

4. [repeat] /execute as @a at @s unless score @s creeperDeath matches 1 if score @s death matches 1.. unless entity @e[type=!item,type=!minecraft:experience_orb,distance=..4] run tellraw @a [{"selector":"@s"}," died from a 360"]
5. [chain] /execute as @a at @s if entity @e[type=cow,distance=..4] if score @s death matches 1.. run tellraw @a [{"selector":"@s"}," died from milking a cow..."]
6. [chain] /execute as @a at @s if score @s creeperDeath matches 1.. if score @s death matches 1.. run tellraw @a [{"selector":"@s"}," died from hugging a creeper!"]
7. [chain] /execute as @a at @s if score @s death matches 1.. run scoreboard players reset @s creeperDeath
8. [chain] /execute as @a at @s if score @s death matches 1.. run scoreboard players reset @s death

Preview

impulse
chain
chain
repeat
chain
chain
chain
chain

Video

Too lazy to copy and paste each command?