player_enter.mcfunction 441 B

1234567
  1. # 当玩家加入游戏时触发
  2. # 如果是旁观者或局号不对头:开始旁观
  3. execute if entity @s[tag=watcher] run function ltw:main/player_enter_watcher
  4. execute if entity @s[tag=!watcher] unless score @s game_id = $ game_id run function ltw:main/player_enter_watcher
  5. # 如果不是旁观且局号正确:游戏中掉线
  6. execute if entity @s[tag=!watcher] if score @s game_id = $ game_id run function ltw:main/player_enter_rejoin