player_enter.mcfunction 831 B

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