player_enter.mcfunction 633 B

12345678910111213141516171819202122232425262728
  1. # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
  2. function lib:sounds/music/hub
  3. title @s clear
  4. title @s actionbar ""
  5. # 重置玩家血量上限
  6. attribute @s generic.max_health base set 20
  7. # 重置经验值
  8. xp set @s 0 points
  9. xp set @s 0 levels
  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. effect give @s resistance 1000000 4 true
  16. # 冒险模式
  17. gamemode adventure @s[tag=!debug]
  18. # 传送玩家
  19. tp @s[tag=!debug] 10 16 10
  20. # 刷新物品
  21. clear @s[tag=!debug]
  22. function ltw:state/0/shop/refresh_gold