player_enter.mcfunction 589 B

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