player_enter.mcfunction 669 B

1234567891011121314151617181920212223
  1. # 单个玩家开始小游戏时执行
  2. # TODO: 让 BGM 支持循环播放
  3. function lib:sounds/music/mini_slow
  4. title @s clear
  5. title @s actionbar ""
  6. effect clear @s
  7. effect give @s saturation 1000000 0 true
  8. effect give @s haste 1000000 1 true
  9. gamerule naturalRegeneration false
  10. spreadplayers 1010 5010 6 8 under 246 false @s[team=playing,tag=!rejoining]
  11. # 设置玩家生命
  12. attribute @s generic.max_health base set 20
  13. # 计分板重置
  14. tag @s remove diamond_got
  15. scoreboard players reset @s diamond
  16. scoreboard players set @s[team=playing,tag=!rejoining] diamond 0
  17. # 调整模式
  18. gamemode spectator @s[team=!debugging]
  19. gamemode survival @s[team=playing,tag=!rejoining]