player_enter.mcfunction 601 B

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