Minecraft death covered for PVP?

si
9

Build a small PVP game in Minecraft 1.16.1 I would like to have a command (s) that could tell whether a player has died and then a message saying who won

Hu

There's no command that looks if someone is dead.

gl

/ execute if entity @a [nbt = {Health: 0f}] run command

si

But it has to be possible somehow, for example with scorebor or something

gl

Of course

There are two ways to test this.

gl

It's also easier with NBTs

Hu

You only have the normal death display

Hu

Which

gl

There's also a health scoreboard

gl

With scoreboards or with NBTs (see my answer)