Name | Give |
Syntax | give [<item>|...] (quantity:<#>) (unlimit_stack_size) (to:<inventory>) (slot:<slot>) (allowed_slots:<slot-matcher>) (ignore_leftovers) |
Short Description | Gives the player an item or xp. |
Full Description | Gives the linked player items.
Optionally specify a slot to put the items into. If the slot is already filled, the next available slot will be used. If the inventory is full, the items will be dropped on the ground at the inventory's location. For player inventories, only the storage contents are valid - to equip armor or an offhand item, use equip. Specifying "unlimit_stack_size" will allow an item to stack up to 64. This is useful for stacking items with a max stack size that is less than 64 (for example, most weapon and armor items have a stack size of 1). When giving an item, you can specify any valid inventory as a target. If unspecified, the linked player's inventory will be used. You may optionally specify a "slot" as any valid slot input per Slot Inputs to be the starting slot index. You may optionally specify "allowed_slots" to forcibly restrict the item to only be given to certain specific slots that match a slot-matcher. You may optionally specify "ignore_leftovers" to cause leftover items to be ignored. If not specified, leftover items will be dropped. To give xp to a player, use experience. To give money to a player, use money. |
Related Tags | <PlayerTag.inventory> Returns a InventoryTag of the player's current inventory. (...)
<entry[saveName].leftover_items> returns a ListTag of any item(s) that didn't fit into the inventory.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/GiveCommand.java#L31 |