可以利用@a与@e[type=player]来区分,@a可以选择包括死亡玩家,但是@e[type=player]只能选择活的,所以说给所有玩家一个标签,再移除活的玩家的标签,就可以得到逝世的。
① tag @e remove death_lock
② tag @a[tag=death,tag=!death_lock]
③ tag @a add death
④ tag @e[type=player] remove death
(①循环保持开启,②到④连锁无条件保持开启)
这样就得到了死亡玩家
后面以这种形式进行你想要的操作
execute @a[tag=death,tag=!death_lock] ~~~ (你想要的指令)
(注意后面要设为有条件)