I'm creating a Minecraft PVP map where players can purchase enchanted weapons for XP. However, I'm supplying certain items in my shop that I do not want players to repair with anvils (e.g. A "Sniper Bow" which insta-kills players with a remaining durability of 10 shots). How can I make a mechanism in vanilla Minecraft to automatically remove anvils once placed?


If the total cost to repair an item is greater than 39, it cannot be repaired in survival mode. You can use the RepairCost nbt tag to make it too expensive to repair an item in an anvil. For example, this command will spawn a Power 10 bow that cannot be repaired with an anvil:

/give @p minecraft:bow 1 374 {ench:[{id:48,lvl:10}],RepairCost:40}
| improve this answer | |
  • Great, this solves ratchet-freaks's problem of preventing fast players and server lag ;) – zeldarulez Nov 21 '13 at 0:43

Set a command block with a comparator clock that runs:

/clear @a minecraft:anvil

This will always clear out any anvils any player has in their inventory. The player won't get the items back, but it should be punishment for making an anvil

| improve this answer | |
  • 1
    @zeldarulez this only removes them from player inventories, a fast player may be able to outspeed the timer, but a too fast timer may bog down the server – ratchet freak Nov 18 '13 at 11:47
  • @ratchetfreak I don't think anyone will be fast enough to beat a 2-tick clock. Anyways, I think this is the best you can do without hundreds of command blocks testing for anvil blocks and removing them. – Cin316 Nov 20 '13 at 1:26

Your Answer

