2
0

player_enter.mcfunction 548 B

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