player_enter.mcfunction 724 B

12345678910111213141516171819202122232425262728293031
  1. # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
  2. function lib:sounds/music/rest
  3. title @s clear
  4. title @s actionbar ""
  5. # 显示 Title
  6. title @s times 5 53 2
  7. title @s subtitle ""
  8. title @s title "选择奖励"
  9. # 重置玩家血量上限
  10. attribute @s generic.max_health base set 20
  11. # 状态效果
  12. effect clear @s
  13. effect give @s saturation 1000000 0 true
  14. gamerule naturalRegeneration true
  15. effect give @s night_vision 1000000 0 true
  16. # 显示小游戏结果
  17. function mini:main/show_result
  18. execute at @s run function lib:sounds/levelup
  19. # 自由旁观
  20. gamemode spectator @s[team=!debugging]
  21. spectate
  22. # 清理物品
  23. clear @s #mini:game_item{game_item:1b}
  24. clear @s red_dye{LockItem:1b}
  25. recipe take @s *