player_enter.mcfunction 501 B

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