player_enter.mcfunction 545 B

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