如题,版本1.13+
@a[nbt={Inventory:[{Slot:-106b,tag:{}}]}]
xmdhs 发表于 2020-3-23 17:41
@a[nbt={Inventory:[{Slot:-106b,tag:{}}]}]
格式错误了吧。
xmdhs 发表于 2020-3-23 17:41
@a[nbt={Inventory:[{Slot:-106b,tag:{}}]}]
tag为a,物品id为paper
Ghost/残念 发表于 2020-3-23 17:45
tag为a,物品id为paper
?哪里错了,我给你的是选择器
@a[nbt={Inventory:[{Slot:-106b,tag:{a:1b}}]}]
xmdhs 发表于 2020-3-23 17:47
?哪里错了,我给你的是选择器
@a[nbt={Inventory:[{Slot:-106b,tag:{a:1b}}]}]
还要加个1b啊。。。行
/scoreboard players tag @a remove selected
/scoreboard players tag @a add selected {Inventory:[{Slot:-106b,id:"minecraft:diamond_sword"}]}
say @a[tag=selected] 副手是钻石剑
/scoreboard players tag @a add selected {Inventory:[{Slot:-106b,id:"minecraft:diamond_sword"}]}
say @a[tag=selected] 副手是钻石剑
不好意思 补充一下 出处
https://www.mcbbs.net/thread-888951-1-1.html
https://www.mcbbs.net/thread-888951-1-1.html
/scoreboard players tag @a remove selected
/scoreboard players tag @a add selected {Inventory:[{Slot:-106b,id:"物品id"}]}
/检测指令
/后续触发
/scoreboard players tag @a add selected {Inventory:[{Slot:-106b,id:"物品id"}]}
/检测指令
/后续触发