player_enter.mcfunction 563 B

12345678910111213141516171819202122
  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. # 传送玩家
  13. tp @s 7.0 11.4 2007.0 0 0
  14. # 自由旁观
  15. gamemode spectator
  16. spectate
  17. # 如果玩家在奖励选择阶段重连,玩家应该跳过此次奖励选择