player_enter.mcfunction 686 B

12345678910111213141516171819202122232425262728
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_fast
  3. title @s clear
  4. title @s actionbar ""
  5. # 给予状态效果
  6. function mini:tntrun/give_effect
  7. # 设置玩家生命
  8. attribute @s generic.max_health base set 20
  9. gamerule naturalRegeneration true
  10. # 传送玩家
  11. spreadplayers 1019.5 2020.5 2 2 false @s[team=playing,tag=!rejoining]
  12. # 清理 tag
  13. tag @s remove layer_bottom
  14. # 两秒后才开始 TNT 掉落
  15. tag @s remove tntrun_pc
  16. # schedule: tag @a add tntrun_pc
  17. # 调整模式
  18. gamemode spectator @s[team=!debugging]
  19. gamemode adventure @s[team=playing,tag=!rejoining]
  20. # 重新加入处理
  21. execute if entity @s[tag=rejoining] run function mini:tntrun/player_failed