player_enter.mcfunction 609 B

12345678910111213141516171819202122232425
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_secret
  3. title @s clear
  4. title @s actionbar ""
  5. # 状态效果
  6. effect clear @s
  7. effect give @s night_vision 1000000 0 true
  8. # 设置玩家生命
  9. attribute @s generic.max_health base set 20
  10. gamerule naturalRegeneration false
  11. # 计分板重置
  12. scoreboard players set @s rgb_R 0
  13. scoreboard players set @s rgb_G 0
  14. scoreboard players set @s rgb_B 0
  15. # 传送玩家
  16. spreadplayers 1038 8031 8 30 under 20 false @s[team=playing,tag=!rejoining]
  17. # 调整模式
  18. gamemode spectator @s[team=!debugging]
  19. gamemode survival @s[team=playing,tag=!rejoining]