player_enter.mcfunction 924 B

123456789101112131415161718192021222324252627282930
  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 set @s[team=playing,tag=!rejoining] countdown_fast 0
  16. scoreboard players reset @s use_trident
  17. scoreboard players reset @s countdown
  18. # 传送玩家
  19. spreadplayers 1030 6031 3 3 under 18 false @s[team=playing]
  20. # 调整模式
  21. gamemode spectator @s[team=!debugging]
  22. gamemode adventure @s[team=playing,tag=!rejoining]
  23. # 重新加入处理
  24. execute if entity @s[tag=rejoining] run gamemode spectator