浏览代码

自动旁观获得土豆的人

LTCatt 6 年之前
父节点
当前提交
d57d973b13
共有 1 个文件被更改,包括 3 次插入 和 0 次删除
  1. 3 0
      data/mini/functions/hotpm/pm_init.mcfunction

+ 3 - 0
data/mini/functions/hotpm/pm_init.mcfunction

@@ -4,6 +4,9 @@ tag @a[tag=pm_hoding] remove pm_hoding
 # 刷新土豆
 execute at @s as @a[limit=1,sort=furthest,tag=mini_running] run function mini:hotpm/pm_get
 
+# 旁观土豆持有者
+execute as @a[gamemode=spectator] run spectate @p[tag=pm_hoding]
+
 # 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]