0

I have commands set up to kill an item whenever they touch the ground. In this case it is iron boots but I want to know how I can kill iron boots with a certain name. I think I have to add the custom name into the following command:

/scoreboard players set @e[type=Item] IronB 1 {Item:{id:minecraft:iron_boots}}

But I don't know how to add the custom name. I couldn't find a solution anywhere, and tried to figure it out myself but failed. Sorry if my question isn't clear.

  • Does the item entity have the name (like how you name things with nametags) or the item inside the entity have the name (like how you name things with anvils)? – SirBenet Aug 4 '16 at 19:47
  • I name it with the /give command, if that is what you're asking – IaskYouAnswer Aug 4 '16 at 20:28
  • So you're doing something like display:{Name:"named item"} and not CustomName:"named item", correct? Just making sure because a dropped item has two different types of name. – SirBenet Aug 4 '16 at 20:31
  • Thank you for trying to help me but someone already got it, i appreciate you taking the time to try to help me :) – IaskYouAnswer Aug 4 '16 at 20:48
  • "someone already got it" - that person was me :P, I took a guess that you probably meant the former. – SirBenet Aug 4 '16 at 21:06
2

The command you want should be:

/scoreboard players set @e[type=Item] IronB 1 {Item:{id:minecraft:iron_boots,tag:{display:{Name:"Named boots"}}}}

Where you replace Named boots with the item name you have given them.

Then /kill @e[score_IronB_min=1].

| improve this answer | |
  • Thank you, When i was trying to figure out how to do it by myself i did the command the way how you presented it, but i added 2 brackets to finish the command not 4 lol – IaskYouAnswer Aug 4 '16 at 20:47
  • If colorfusion's answer was helpful, please upvote it (if you haven't already) to show your appreciation. – Mano Aug 5 '16 at 8:11

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.