player_enter.mcfunction 702 B

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