player_enter.mcfunction 399 B

12345678910111213141516
  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 blindness 1000000 0 true
  11. # 自由旁观
  12. gamemode spectator @s
  13. spectate