player_enter.mcfunction 1001 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_middle
  3. title @s clear
  4. title @s actionbar ""
  5. # 给予状态效果
  6. function mini:parkour/give_effect
  7. # 设置玩家生命
  8. attribute @s generic.max_health base set 20
  9. gamerule naturalRegeneration true
  10. # 计分板重置
  11. scoreboard players reset @s treasure
  12. scoreboard players set @s[team=playing,tag=!rejoining] treasure 0
  13. tag @s remove treasure1
  14. tag @s remove treasure2
  15. tag @s remove treasure3
  16. tag @s remove treasure4
  17. tag @s remove treasure5
  18. tag @s remove treasure6
  19. tag @s remove treasure7
  20. tag @s remove treasure8
  21. tag @s remove treasure9
  22. tag @s remove treasure10
  23. # 传送玩家
  24. spreadplayers 1018 1007 4 6 under 9 false @s[team=playing,tag=!rejoining]
  25. # tp @s[team=playing,tag=!rejoining] 1010.07 7.50 1006.98 -1518.69 -10.62
  26. # 调整模式
  27. gamemode spectator @s[team=!debugging]
  28. gamemode adventure @s[team=playing,tag=!rejoining]
  29. # 修改 Tag
  30. tag @s add parkour_portal
  31. tag @s[team=playing,tag=!rejoining] remove parkour_portal