player_enter.mcfunction 726 B

12345678910111213141516171819202122232425262728
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_middle
  3. title @s clear
  4. title @s actionbar ""
  5. # 给予状态效果
  6. function mini:hotpm/give_effect
  7. # 设置玩家生命
  8. scoreboard players set @s[team=playing,tag=!rejoining] mini_heart 3
  9. function mini:main/player_max_health
  10. gamerule naturalRegeneration true
  11. # 清理 Tag
  12. tag @s remove pm_holding
  13. tag @s remove pm_damage_dealt
  14. tag @s remove pm_damage_taken
  15. tag @s remove pm_explode_last
  16. # 传送玩家
  17. tp @s[team=playing,tag=!rejoining] 1018.0 8 3015.0
  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:main/player_failed