Clear a custom item from Inventory
I've looked at a few other questions on here about this, but I still can't get this to work. I've already looked at this: Clear item with custom name?
I'm trying to clear a custom item (just one) from a player's inventory through a command block.
Here's my command:
/clear @p gold_ingot 0 1 {display:{Name:"Stamped Gold Bar",Lore:["One Gold Bar","Stamped on site at Acacia Mint"],,ench:[{id: 34, lvl:1}]}}
Here's my error message:
[00:37:53] Removed 0 of gold_ingot from Jowaaay.
Even if I just do /clear @p gold_ingot
, it will not remove my custom gold ingot, and will still give the same error message. I tried putting regular gold ingots into my inventory just to test that I had the correct syntax, and regular items do seem to cooperate with the /clear command.
I followed the advice given by the user who solved the above question, but I still can't get this to work. Wondering if it has to do with the enchantment on the gold ingot?
I'm running a Bukkit server with a 1.8 Minecraft. I do have Essentials installed, but I don't see how that would affect this.
Solution 1:
First you need to close the display:{}
tag then remove the extra comma. So it should look like this:
/clear @p gold_ingot 1 0 {display:{Name:"Stamped Gold Bar",Lore:["One Gold Bar","Stamped on site at Acacia Mint"]},ench:[{id:34,lvl:1}]}}
This will most likely work, I'm not sure though.