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 183 commands...
NameTake
Syntaxtake [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>)
Short DescriptionTakes an item from the player.
Full DescriptionTakes items from a player or inventory.

If the player or inventory does not have the item being taken, nothing happens.

Using 'slot:' will take the items from that specific slot.

Using 'flagged:' with a flag name will take items with the specified flag name, see Language:flag system.

Using 'iteminhand' will take from the player's held item slot.

Using 'cursoritem' will take from the player's held cursor item (as in, one that's actively being picked up and moved in an inventory screen).

Using 'bydisplay:' will take items with the specified display name.

Using 'bycover:' will take a written book by the specified book title + author pair.

Using 'raw_exact:' (Intentionally undocumented) will compare all raw details of an item exactly. This is almost always a bad idea to use. DO NOT USE.

Using 'item:' will take items that match an advanced item matcher, using the system behind Language:Advanced Object Matching.

Flagged, Slot, ByDisplay, and Raw_Exact, all take a list as input to take multiple different item types at once.

If no quantity is specified, exactly 1 item will be taken.

Specifying a raw item without any matching method is considered unreliable and should be avoided.

Optionally using 'from:' to specify a specific inventory to take from. If not specified, the linked player's inventory will be used.

The options 'iteminhand' and 'cursoritem' require a linked player and will ignore the 'from:' inventory.

To take xp from a player, use Command:experience.
To take money from a player, use Command:money.
Related Tags<PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
Usage Example
#Use to take an arrow from the player's enderchest
- take item:arrow from:<player.enderchest>
Usage Example
#Use to take the current holding item from the player's hand
- take iteminhand
Usage Example
#Use to take 5 emeralds from the player's inventory
- take item:emerald quantity:5
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41