pm_init.mcfunction 696 B

12345678910111213141516
  1. # 清理残余tag
  2. tag @a[tag=pm_hoding] remove pm_hoding
  3. # TODO : 这个见鬼东西现在会刷新给最近的人
  4. # 将土豆刷新给离自己最远的人
  5. execute at @s as @a[sort=furthest,tag=mini_running,limit=1] run function mini:hotpm/pm_get
  6. # 旁观土豆持有者
  7. execute as @a[gamemode=spectator] run spectate @p[tag=pm_hoding]
  8. # 告知玩家
  9. tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
  10. # 土豆爆炸时间 = 5 * (存活人数 + 1)
  11. scoreboard players set $countdown mem 5
  12. execute as @a[tag=mini_running] run scoreboard players add $countdown mem 5