Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameGive
Syntaxgive [<item>|...] (quantity:<#>) (unlimit_stack_size) (to:<inventory>) (slot:<slot>) (allowed_slots:<slot-matcher>) (ignore_leftovers)
Short DescriptionGives the player an item or xp.
Full DescriptionGives 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 Command: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 Language: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 Command:experience.
To give money to a player, use Command: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
# Use to give an item to the player.
- give iron_sword
Usage Example
# Use to give an item and place it in a specific slot if possible.
- give WATCH slot:5
Usage Example
# Use to give an item to some other defined player.
- give diamond player:<[target]>
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/GiveCommand.java#L31