I'm working on the KitPVP part of my server again. I'm trashing the part about buying the kits. All of them will be free. I'm trying to use /replaceitem to get the players their kits, but I have a few problems. I'm trying to get a leather tunic on the user which is dyed, named "Brute's Body", and enchanted. This is what I've tried:

replaceitem entity @p slot.armor.chest leather_chestplate 1 0 {display:{color:7514398,Name:Brute's Body},ench:[{id:0,lvl:4},{id:34,lvl:10}]}

When I try this, it says it replaced that slot with "leather chestplate" but then it doesn't. Does anyone know how to fix this?

  • What happens if you take it off first? Did you try a shorter command first? Otherwise any part of this could be the problem. – Fabian Röling Apr 14 '18 at 12:14
  • Um... no this is the only command I could think of that would work – hakalo Apr 14 '18 at 12:25
  • I think it has something to do with the name, though. It worked without the name, but when I added it, it didn't – hakalo Apr 14 '18 at 12:25
  • Very good, that's step 1 of debugging. Step 2, try the name alone and see if it works. – Fabian Röling Apr 14 '18 at 15:03
  • Ok, I did that. It didn't work with the name alone, either. – hakalo Apr 14 '18 at 15:06

The Name tag needs to be contained within quotation marks:

replaceitem entity @p slot.armor.chest leather_chestplate 1 0 {display:{color:7514398,Name:"Brute's Body"},ench:[{id:0,lvl:4},{id:34,lvl:10}]}
  • I just tried that, it doesn't work either. – hakalo Apr 14 '18 at 14:55
  • Could the problem be that the command block chain isn't set up right? It is: block with button on front = top, normal command block facing down = middle, chain command block facing down = bottom. The chain one is the one with the "Brute's Body" command. – hakalo Apr 14 '18 at 15:04
  • The command, as I posted, works properly for me. Type the command into chat to run manually to test it. This will tell you if it's the command blocks. If you have a "normal" command block (which I took to mean Impulse), in between the first command block and a chain block, it is definitely wrong if you are expecting chained execution. – IronAnvil Apr 14 '18 at 16:01
  • @hakalo Is the command block maybe set to "always active" or the chain command block to "requires redstone"? Also, you should try commands in chat first to rule out such problems. – Fabian Röling Apr 14 '18 at 16:16
  • Yeah, ok. I put the command into chat and it worked. This means it has to have something to do with the command blocks – hakalo Apr 14 '18 at 21:48

Execute this in chat, but make sure your in 1.12:

/replaceitem entity @p slot.armor.chest leather_chestplate 1 0 {display:{color:7514398,Name:"Brute's Body"},ench:[{id:0,lvl:4},{id:34,lvl:10}]}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.