player_enter.mcfunction 651 B

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