player_enter.mcfunction 643 B

12345678910111213141516171819202122232425
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_slow
  3. title @s clear
  4. title @s actionbar ""
  5. # 状态效果
  6. effect clear @s
  7. effect give @s saturation 1000000 0 true
  8. effect give @s instant_health 10 0 true
  9. gamerule naturalRegeneration false
  10. # 计分板重置
  11. scoreboard players reset @s kill_phantom
  12. scoreboard players reset @s use_trident
  13. scoreboard players reset @s countdown
  14. # 传送玩家
  15. tp @s[tag=!debug] 1030.5 24.5 6031.5
  16. # 调整模式
  17. gamemode spectator @s[tag=!debug]
  18. gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
  19. # 重新加入处理
  20. execute if entity @s[tag=rejoining] run gamemode spectator