player_failed.mcfunction 388 B

1234567891011
  1. # 玩家失败时由玩家自己触发
  2. # 失败提示与计数
  3. tag @s remove mini_running
  4. scoreboard players set $temp mem 0
  5. execute as @a[tag=mini_running] run scoreboard players add $temp mem 1
  6. tellraw @a [{"selector": "@s","color":"red"}," 已失败! 剩余 ",{"score": {"name": "$temp","objective": "mem"}}," 人!"]
  7. # 进入旁观
  8. gamemode spectator @s
  9. spectate @r[tag=mini_running]