I really want to know how to do that

  • If you are on education edition, which I highly doubt that you are but just want to put this out there for anybody using education edition, use /worldimmutable. – brododragon Oct 14 '19 at 2:26

The easiest method is to use cheat

/give @p minecraft:YOURITEM 1 0 {Unbreakable:1}
| improve this answer | |

You can use the following command:

/give @p minecraft:stick{Enchantments:[{id:"minecraft:unbreaking",lvl:2147483647}]} 1

Also change stick for your item of choice.

| improve this answer | |
  • 2
    I am not Minecraft Command expert, but what exactly will adding Sharpness do to make an item unbreakable? – The Mattbat999 Oct 13 '19 at 21:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.