先建立死亡计分板/scoreboard objectives add sw deathCount 死亡
然后1:/execute @a[score_sw=0,score_sw_min=0] ~ ~ ~ /testfor @a循环命令方块检测
2:/scoreboard players set @a[score_sw_min=1] sw 0 清除计分板
左边命令方块为1,右边为2