player_enter.mcfunction 518 B

1234567891011121314151617181920
  1. # 单个玩家开始小游戏时执行
  2. # TODO: 让 BGM 支持循环播放
  3. function lib:sounds/music/mini_slow
  4. title @s clear
  5. title @s actionbar ""
  6. # 状态效果
  7. effect clear @s
  8. effect give @s saturation 1000000 0 true
  9. gamerule naturalRegeneration false
  10. # 设置玩家生命
  11. attribute @s generic.max_health base set 20
  12. # 传送玩家
  13. spreadplayers 1010 6010 4 6 under 255 false @s[team=playing,tag=!rejoining]
  14. # 调整模式
  15. gamemode spectator @s[team=!debugging]
  16. gamemode survival @s[team=playing,tag=!rejoining]