#How Do You Damage an Item Via a Command?
1 messages · Page 1 of 1 (latest)
You can run a replaceitem command on someone holding that item
replaceitem entity @p[hasitem={item=diamond_sword,location=slot.weapon.mainhand,data=0}] slot.weapon.mainhand 0 diamond_sword 1 550
this will damage the sword (which has not yet been used, data = 0) by 550
so if I change that "550" to "1" it will damage the sword by 1 durability point?
Can you answer my question please?
Yes, but to damage it again you must use another command with data = 1 and damage it to 2
And then create a sequence with 1 command for each durability point
Unfortunately this is how it is done with commands, but with scripts it is much easier