player_enter.mcfunction 499 B

1234567891011121314151617181920212223
  1. # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
  2. function lib:sounds/music/hub
  3. title @s clear
  4. title @s actionbar ""
  5. # 清理物品
  6. clear @s
  7. # 重置玩家血量上限
  8. attribute @s generic.max_health base set 20
  9. # 状态效果
  10. effect clear @s
  11. effect give @s saturation 1000000 0 true
  12. gamerule naturalRegeneration true
  13. effect give @s night_vision 1000000 0 true
  14. effect give @s resistance 1000000 4 true
  15. # 冒险模式
  16. gamemode adventure
  17. # 传送玩家
  18. tp @s 10 16 10