Item

Give Generator

Create give commands with names, lore and enchantments for modern and legacy syntax.

Command

Item Styling

Enchantments

About the /give generator

The /give command puts an item directly into a player's inventory. It is used constantly in map making and server setup, and it is where the 1.20.5 component rewrite causes the most confusion: the enchantment and lore syntax that worked for years no longer applies on modern versions.

How to use this generator

Choose the target selector, the item and the count, then layer on enchantments, custom names, lore lines and attribute modifiers. Select the correct Minecraft version first, because the generator emits component syntax for 1.20.5 and later and legacy NBT for older releases.

Things worth knowing

  • @p targets the nearest player, @s the command's executor, and @a every player online.
  • The count is capped by the item's own stack size, so asking for 64 of a non-stackable item still gives one.
  • Enchantment levels above the vanilla maximum are legal through commands and behave as expected.
  • Lore lines are JSON text components, so colour and formatting are set per line rather than with legacy codes.

The generated command is produced entirely in your browser and nothing you enter is sent to EloTiers. Paste the result into the chat bar or a command block in your own world. If a command is rejected, check that the Minecraft version selected here matches the version you are actually running — the item and entity data format changed substantially in 1.20.5.

Worked examples

A sharpened sword (Java 1.21.5 and later)

/give @p minecraft:diamond_sword[enchantments={sharpness:5,unbreaking:3}] 1

Components carry the enchantments in square brackets after the item name. Sharpness 5 and Unbreaking 3 are the vanilla maximums for those enchantments on a sword.

The same sword on Java 1.20.4

give @p minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5}]} 1

Before the component rewrite, enchantments lived in an NBT list on the item. If you paste this into a modern game it will be rejected, which is why the version selector matters.

A stack of food for everyone

/give @a minecraft:golden_apple 16

The @a selector targets every player online, so each of them receives sixteen golden apples in their inventory.

Frequently asked questions

Why is my enchantment command rejected on a new version?

Minecraft 1.20.5 replaced item NBT with data components and 1.21.5 simplified the enchantment component again. Commands copied from older tutorials use the retired syntax. Select your exact version in the generator and use its output.

Can I give an item to a player who is offline?

No. /give only works on players that are currently online. For offline players you have to wait until they join, or edit their player data with external tools.

What happens when the inventory is full?

The item is dropped on the ground at the player's feet instead, so nothing is lost, but anyone nearby can pick it up.