mojira.dev
MC-126305

Execute Command Broken?

I wanna make a command which works when you hold a item and give to player a armor with a tag, but when I try to make it work, only the chestplate is not appearing on armor slot.

/execute @s[tag=Imp] ~ ~ ~ replaceitem entity @p slot.armor.chest minecraft:leather_chestplate 1 0 {Tags:["killitem"],Item:{id:"leather_chestplate",Count:1,tag:{jetpack:1b,display:

Resuming what I want to make: I want to make a command which add a armor to player when you hold a item, but this armor needs three tags: Imp, killitem and jetpack

Update: I tried this one, but it doesn't work anyway:
/execute @s[tag=Imp] ~ ~ ~ replaceitem entity @p slot.armor.chest minecraft:leather_chestplate 1 0 {tag:{jetpack:1b,display:,Item:{id:"leather_chestplate",Count:1}}}}

Comments 2

you’re:

  1. Using @s, which’ll not target every player, only the one running the command.

  2. defining the item nbt wrongly; you’re not creating an item entity, just an item object, nbt arguments start in the tag tag for item objects.

I don't get it where's the problem.

Julio Arduini Neto

(Unassigned)

Unconfirmed

Minecraft 1.12.2

Retrieved