player_enter.mcfunction 650 B

1234567891011121314151617181920212223242526
  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. effect give @s saturation 1000000 0 true
  9. # 设置玩家生命
  10. attribute @s generic.max_health base set 20
  11. gamerule naturalRegeneration false
  12. # 计分板重置
  13. scoreboard players set @s rgb_R 0
  14. scoreboard players set @s rgb_G 0
  15. scoreboard players set @s rgb_B 0
  16. # 传送玩家
  17. spreadplayers 1038 8031 8 30 under 20 false @s[team=playing,tag=!rejoining]
  18. # 调整模式
  19. gamemode spectator @s[team=!debugging]
  20. gamemode survival @s[team=playing,tag=!rejoining]