player_changed.mcfunction 346 B

12345678
  1. # 计算玩家数量
  2. execute store result score $alive_now mem if entity @a[tag=mini_running,tag=!watcher]
  3. # 比较玩家数量
  4. execute unless score $alive_now mem = $alive mem run function mini:main/player_leave
  5. # 重置玩家数量
  6. execute unless score $alive_now mem = $alive mem run scoreboard players operation $alive mem = $alive_now mem