player_enter.mcfunction 795 B

12345678910111213141516171819202122232425262728
  1. # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
  2. title @s clear
  3. title @s actionbar ""
  4. # 状态效果
  5. effect clear @s
  6. effect give @s saturation 1000000 0 true
  7. gamerule naturalRegeneration true
  8. effect give @s resistance 1000000 4 true
  9. # 传送玩家
  10. tp @s[team=!debugging] 24.5 11.0 1967.5 112.5 25
  11. execute at @s run function lib:sounds/travel
  12. # 清除 Tag
  13. tag @s[team=watching] remove mini_rank1
  14. tag @s[team=watching] remove mini_rank2
  15. tag @s[team=watching] remove mini_rank3
  16. tag @s[team=watching] remove mini_rank4
  17. tag @s[tag=rejoining] remove mini_rank1
  18. tag @s[tag=rejoining] remove mini_rank2
  19. tag @s[tag=rejoining] remove mini_rank3
  20. tag @s[tag=rejoining] remove mini_rank4
  21. tag @s remove selecting
  22. # 自由旁观
  23. gamemode spectator @s[team=!debugging]
  24. spectate