Is there a way to have a custom death message in vanilla Minecraft? [duplicate]

Basically, I want a custom death message by using tellraw, but how would I make it detect someone has died? Do I use a scoreboard system, do I use testfor, what do I use to make it detect someone died?

4

1 Answer

fist you'll need a score board for death count

/scoreboard objectives add <score name> deathCount

when its greater then one, use tellraw @a[score_<score name>_min=1] "you died" to give the message to the person that died

then you'll want to reset all of the death scores to zero so you don't give the message more then once to a player

/scoreboard players set @a <score name> 0

EDIT: made it a little more of a tutorial for people finding this thread

2

You Might Also Like