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 180 commands...
Syntaxgive [xp/<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 inventory items or xp.

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.

If 'xp' is specified, this will give experience points to the linked player.

To give money to a player, use Command:money.
Related Tags<PlayerTag.xp_level> Returns the number of XP levels the player has. (...)
<PlayerTag.xp_to_next_level> Returns the amount of XP the player needs to get to the next level. (...)
<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 XP to the player.
- give xp quantity:10
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]>