player_enter.mcfunction 962 B

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