Diamond sword

Minecraft Give Command Generator

Build a /give command for any item and let the generator decide the syntax. Java 1.20.5 moved item data out of legacy NBT tags and into item components, so a command written one way silently fails on the other. Select your version, add the name, lore, enchantments and flags visually, and copy output that will actually run.

  • Custom name and lore as text components, with italics and colour under your control
  • Enchantments beyond the vanilla level cap, unbreakable, and enchantment glint override
  • Item components on 1.20.5+ and the legacy display / Enchantments NBT below it

Read the matching guide

Example commands

Plain give

/give @p minecraft:diamond_sword 1

Item id and count -- identical in spirit on every version and edition.

Sharpness 1000

/give @p minecraft:netherite_sword[enchantments={"minecraft:sharpness":1000}] 1

Over-cap levels only work through /give; /enchant refuses anything above the vanilla max.

Named, unbreakable, with lore

/give @p minecraft:diamond_sword[custom_name={text:"Arena Blade",color:"gold"},lore=["Issued to champions"],unbreakable={}] 1

Name, lore and the unbreakable flag ride item components on 1.20.5+ and display/Unbreakable NBT below it.

The same build across versions

Rows appear only where the output actually changes -- copy the one that matches your world.

Java 1.16

/give @p minecraft:diamond_sword{display:{Name:'{"text":"Arena Blade"}'},Enchantments:[{id:"minecraft:sharpness",lvl:10s}],Unbreakable:1b} 1

Java 1.21.4

/give @p minecraft:diamond_sword[custom_name='{"text":"Arena Blade"}',enchantments={levels:{"minecraft:sharpness":10},show_in_tooltip:true},unbreakable={show_in_tooltip:true}] 1

Java 26.2

/give @p minecraft:diamond_sword[custom_name="Arena Blade",enchantments={"minecraft:sharpness":10},unbreakable={}] 1

Bedrock 26.x

# Bedrock Stable - run this block for one item, then hold it in your main hand before /enchant.
# Omitted Java-only item data for Bedrock: custom_name, unbreakable.
/give @p diamond_sword 1
# Pick up the item, select it in your main hand, then run:
/enchant @p sharpness 10

FAQ

How do I give an item with Sharpness 1000?

Add the enchantment and type 1000 as the level. /give accepts any level, unlike /enchant which refuses anything above the vanilla cap. The generator writes the over-cap value straight into the command.

Why does my /give command fail on 1.21?

Java 1.20.5 replaced legacy NBT tags ({Enchantments:[...]}, {display:{...}}) with item components ([enchantments={...}], [custom_name=...]). A command copied from an older guide silently fails on newer versions. Select your exact version and copy the regenerated command.

How do I make an item unbreakable?

Toggle Unbreakable. On 1.20.5+ it writes the unbreakable component; below that it writes the Unbreakable:1b tag. The item then ignores all durability loss and the flag survives a smithing-table upgrade.

How do I give a custom player head?

Use the Player Head item and enter a username or a texture. The generator writes the profile component on modern versions or the legacy SkullOwner tag on older ones, so the head shows the right skin in-game.

Does the /give command work the same on Bedrock?

The base command runs, but Bedrock has no component or NBT payload in /give, so names, lore and enchantments are dropped. The generator emits the plain Bedrock command and warns about each Java-only field.