I am working on my VANILLA Minecraft server right now and I'm in a bit of a struggle. A player can purchase an iron sword called SLAYER Sword, and can also purchase a regular iron sword. A player can also sell an iron sword at a price of 3 Scoreboard Units. I want ONLY the regular iron sword to be sold, not the SLAYER Sword. The text I am currently using to sell a single sword is /clear @p minecraft:iron_sword -1 1. This is currently clearing BOTH swords, not just the regular iron sword.

  • 2
    Please do not edit the title to "[SOLVED]", if you have found the answer then post one – Memor-X Jun 19 '15 at 3:53
  • Yep, don't do that. Only do that in forums. In StackExchange sites, use the tick if the answer works – Universal Electricity Jun 19 '15 at 4:41

I figured it out: make the regular iron sword-giver have a custom name of Iron Sword, which can be done by adding {display:{Name:"Iron Sword"}}. In the seller, make it clear the sword by adding the same display name.

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.