2
0

player_enter.mcfunction 480 B

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