player_enter.mcfunction 547 B

123456789101112131415161718192021
  1. # 单个玩家开始小游戏时执行
  2. # TODO: 让 BGM 支持循环播放
  3. function lib:sounds/music/mini_slow
  4. title @s clear
  5. title @s actionbar ""
  6. # 设置玩家生命
  7. attribute @s generic.max_health base set 20
  8. # 计分板重置
  9. tag @s remove diamond_got
  10. scoreboard players reset @s diamond
  11. scoreboard players set @s[team=playing,tag=!rejoining] diamond 0
  12. # 调整模式
  13. gamemode spectator @s[team=!debugging]
  14. gamemode survival @s[team=playing,tag=!rejoining]
  15. # 执行重生方法
  16. tag @s remove respawning
  17. function mini:diamond/game/respawn1