player_enter.mcfunction 505 B

1234567891011121314151617181920
  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. tp @s[tag=!debug] 1030.5 24.5 6031.5
  12. # 调整模式
  13. gamemode spectator @s[tag=!debug]
  14. gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
  15. # 重新加入处理
  16. execute if entity @s[tag=rejoining] run gamemode spectator