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.

6
  • 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, 2016 at 19:47
  • I name it with the /give command, if that is what you're asking Aug 4, 2016 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, 2016 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 :) Aug 4, 2016 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, 2016 at 21:06

1 Answer 1

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].

2
  • 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 Aug 4, 2016 at 20:47
  • If colorfusion's answer was helpful, please upvote it (if you haven't already) to show your appreciation.
    – Mano
    Aug 5, 2016 at 8:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .