/give
op 2Items/give places an item directly into a player’s inventory. Since 1.20.5 the trailing NBT tag was replaced by square-bracket item components, so a command written for 1.19 will not run on 1.21 without being rewritten.
Who or what the command applies to
A plain item needs nothing here. Add a component to give it a name, lore, enchantments or custom data.
More than one stack is split automatically
Examples
- A named sword
/give @p diamond_sword[custom_name={text:"Frostbite",color:"aqua",italic:false}] 1 - Enchanted book
/give @p enchanted_book[stored_enchantments={"minecraft:mending":1}] - A full stack
/give @a bread 64
Common questions about /give
›Why does my /give command say "Unknown item" or throw a syntax error?
Almost always a version mismatch. Before 1.20.5 extra data went in curly braces, as in diamond_sword{Enchantments:[{id:"sharpness",lvl:5}]}. From 1.20.5 onwards the same item is diamond_sword[enchantments={"minecraft:sharpness":5}]. Check which of the two forms your server version expects — they are not interchangeable.
›How do I stop the custom name showing up in italics?
Custom names render in italics by default. Add italic: false to the name component to stop it, as in custom_name={text:"Excalibur",italic:false}.
›Can I give more than 64 of an item?
Yes. Ask for any amount and the game splits it across stacks, up to the item’s own stack limit. If the inventory is full the leftovers drop on the ground.
›How do I give an item with custom NBT that a selector can find later?
Use the custom_data component (or the old tag NBT before 1.20.5). Anything you put there is ignored by the game but readable with nbt={components:{"minecraft:custom_data":{…}}} in a selector.