player_enter.mcfunction 492 B

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