Consume Items
Removes a specific amount of items from the player's inventory.
/goop consumeitem <player> {filter} <amount> [Inventories] [Shulker box name filter]
If the player doesnt have enough items that match the filter, nothing happens.
Args Breakdown (What everything does)
<Player>
The player whose inventory items will be consumed.
Supports a few vanilla selectors.
{Filter}
Specify what NBT the item must have by the use of a GooP Item Filter.
Always three words long.
<Amount>
The amount of items that will be removed from the player's inventory. Must be an integer number.
Using the all keyword instead of an integer number will remove all the items that match the filter in the player's inventory.
[Locations]
By default, the player's inventory. Here are the letters for each location:
I Player's Inventory, S for shulker boxes within. [Vanilla]
E Player's Enderchest, Z for shulker boxes within. [Vanilla]
C Player's Observed Container, H for shulker boxes within. [GooP Containers]
P Any of the player's Personal Containers, L for shulker boxes within. [GooP Containers]
You may specify multiple locations by writing them out: ISEZ will search enderchest and inventory, and shulker boxes with.
[Shulker box name filter]
Will only look into shulker boxes named this, color-code and case sensitive.
Will only affect Shulker Box locations, by ignoring shulker boxes not named like this
Tips
You can use the all keyword in place for an actuall amount. This will remove all the items the player has that match the filter.
I try to make things case insensitive when possible, such as vanilla names, but when in doubt, stick to what the Tab Completion suggests.
Also, the first items consumed are those held in the mainhand, then the offhand, and then in order through inventory slots.
Simple Examples:
/goop consumeitem gunging v CLAY_BALL 0 5
Will remove 5 clay balls from gunging's inventory. If they have less than 5 clay balls, this command will fail and nothing will happen. Note that MMOItems that are clay balls wont match anymore as of GooP 1.6.
/goop consumeitem gunging m CONSUMABLE MANGO all IEZ
Will remove all mangos from gunging's inventory and enderchest, including shulker boxes within their enderchest, but not shulker boxes in their inventory.
/goop consumeitem gunging e INFINITY 7 1 S &2Ammunition Box
Will remove one item enchanted with Infinity VII from any shulker box named 'Ammunition Box' (Green name) within gunging's inventory.
/goop consumeitem gunging v STONE 0 1000 ISEZCHPL
Will remove 1000 stone blocks from gunging's inventory, whether it is in their inventory, enderchest, any GooP personal container, or a shulker box in all of these locations. However, if they have less than 1000 stone blocks, this command will fail and nothing will happen.
Comment from the Dev:
Surely enough, supporting shulker boxes because such a thing is 'decent'.