Name | Take |
Syntax | take [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>) |
Short Description | Takes an item from the player. |
Full Description | Takes 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 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 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 experience. To take money from a player, use money. |
Related Tags | <PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
|
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/TakeCommand.java#L41 |