player_enter.mcfunction 724 B

1234567891011121314151617181920212223242526
  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 set @s[tag=!watcher,tag=!rejoining,tag=!debug] kill_phantom 0
  13. scoreboard players reset @s use_trident
  14. scoreboard players reset @s countdown
  15. # 传送玩家
  16. tp @s[tag=!debug] 1030.5 24.5 6031.5
  17. # 调整模式
  18. gamemode spectator @s[tag=!debug]
  19. gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
  20. # 重新加入处理
  21. execute if entity @s[tag=rejoining] run gamemode spectator