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 175 commands...
NameGive
Syntaxgive [xp/<item>|...] (quantity:<#>) (unlimit_stack_size) (to:<inventory>) (slot:<slot>)
Short DescriptionGives the player an item, xp, or money.
Full DescriptionGives the linked player or inventory items, 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.

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. (...)
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]>
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/GiveCommand.java#L31