player_enter.mcfunction 794 B

12345678910111213141516171819202122232425262728293031
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_fast
  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. scoreboard players reset @s layer
  12. # 设置玩家生命
  13. attribute @s generic.max_health base set 20
  14. # 传送玩家
  15. spreadplayers 1019.5 2020.5 2 2 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
  16. # schedule: tp @a ~ ~-3 ~
  17. # 两秒后才开始 TNT 掉落
  18. tag @s remove tntrun_pc
  19. # schedule: tag @a add tntrun_pc
  20. # 调整模式
  21. gamemode spectator @s[tag=!debug]
  22. gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
  23. # 重新加入处理
  24. execute if entity @s[tag=rejoining] run function mini:tntrun/player_failed