Commands/give

Gives an item to one or more players.

Syntax

 * Java Edition


 * Bedrock Edition

Arguments
(BE: )
 * Specifies the target to give item(s) to. Must be a player name or target selector.
 * Entities other than players are not allowed.

(BE: )
 * Specifies the item to give. Must be a valid item ID, or block ID for which items exist.

(BE: )
 * Specifies the number of items to give. Must be between 1 and 2,147,483,647 / 32767 (inclusive). If not specified, defaults to.


 * Specifies the item data value of the given item(s). Must be an integer between 0 and 32767 (inclusive), but values that are invalid for the specified item id revert to 0. If not specified, defaults to 0.


 * Specifies the item components of the given item(s). Like data tags but supports only  and   functions (for example, )

Result
Fails if the arguments are not specified correctly, or if  fails to resolve to one or more online players.

On success, summons the specified item(s) at the location(s) of the target(s). If player resolves to multiple targets, each receives the specified number of items. If there is room in the player's inventory, or the player is in creative mode, the item entity summoned is "fake", with its tag set to  and its  tag set to, which would normally make it impossible to pick up the item, and have it despawn within a tick. If the player's inventory is full and they are not in creative mode, the item entity's tag is set to the target and its  tag set to  so that it can be picked up only by that player until within 10 seconds of it despawning, at which time other players may pick it up.There is currently a glitch in Bedrock Edition 1.16 that allows the player to use this command with cheats off.

Examples

 * To give the nearest player a diamond sword with Lore that says "A legendary weapon":
 * To give all players a potion that has the Night Vision effect:
 * To give a random player a Sharpness X diamond sword:
 * To give yourself a block of diamond that can be placed on dirt and can break quartz blocks even in adventure mode.
 * To give all players a level 2 Wither Potion with Knockback X:
 * To give yourself a block of diamond that can be placed on dirt and can break quartz blocks even in adventure mode.
 * To give all players a level 2 Wither Potion with Knockback X:
 * To give all players a level 2 Wither Potion with Knockback X:
 * To give all players a level 2 Wither Potion with Knockback X:
 * To give all players a level 2 Wither Potion with Knockback X: