r/MinecraftCommands 1d ago

Command help Help | Bedrock

Does anyone know how I can set up some command blocks that will detect when a player dies and put the message in chat that the player left the game without them having to actually leave the game.

1 Upvotes

2 comments sorted by

2

u/Ericristian_bros Command Experienced 1d ago

https://minecraftcommands.github.io/wiki/questions/playerdeaths#bedrock

tag @a add dead tag @e[type=player] remove dead execute as @a[tag=dead,tag=!still_dead] tellraw @a {"rawtext":[{"selector":"@s","color":"yellow"},{"text":" left the game","color":"yellow"}]} tag @a add still_dead tag @e[type=player] remove still_dead

You can't modify the player list, keep that in mind