I play Minecraft and I try to deal with the commands, and now the question: How does a command work that I zbs. A used iron sword is created with a command or goes there at all
With this command I would have given myself an iron sword that is 50% broken:
/ give @DogThor minecraft: iron_sword 1 50 {display: {name: "Name_Des_Schwert"}}
I do not know in which version you want to do it but try the website: https://mcstacker.net/
If you don't understand this then use this command:
/ give @p minecraft: iron_sword {Damage: 7} 1
Dogtor's answer is only correct until 1.12. From 1.13 the command goes like this:
/ give @p iron_sword {damage: 50}
I play on the PS4 Edition, so I think Bedrock
Oh so ok. Then that would not have to go sorry. But you can still try it