player_enter.mcfunction 1011 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. tag @s remove treasure9
  24. tag @s remove treasure10
  25. # 传送玩家
  26. tp @s[tag=!watcher,tag=!rejoining,tag=!debug] 1010.07 7.50 1006.98 -1518.69 -10.62
  27. # 调整模式
  28. gamemode spectator @s[tag=!debug]
  29. gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
  30. # 修改 Tag
  31. tag @s add parkour_portal
  32. tag @s[tag=!watcher,tag=!rejoining] remove parkour_portal