player_enter.mcfunction 940 B

12345678910111213141516171819202122232425262728293031
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_slow
  3. title @s clear
  4. title @s actionbar ""
  5. # 给予状态效果
  6. effect clear @s
  7. function mini:phantom/give_effect
  8. # 设置玩家生命
  9. attribute @s generic.max_health base set 20
  10. gamerule naturalRegeneration false
  11. # 计分板重置
  12. scoreboard players reset @s kill_phantom
  13. scoreboard players reset @s kill_phantom2
  14. scoreboard players set @s[team=playing,tag=!rejoining] kill_phantom 0
  15. scoreboard players set @s[team=playing,tag=!rejoining] kill_phantom2 0
  16. scoreboard players set @s[team=playing,tag=!rejoining] countdown_fast 0
  17. scoreboard players reset @s use_trident
  18. scoreboard players reset @s countdown
  19. # 传送玩家
  20. spreadplayers 1030 6031 3 3 under 18 false @s[team=playing]
  21. # 调整模式
  22. gamemode spectator @s[team=!debugging]
  23. gamemode adventure @s[team=playing,tag=!rejoining]
  24. # 重新加入处理
  25. execute if entity @s[tag=rejoining] run gamemode spectator