|Short Description||Edits the inventory of a player, NPC, or chest.|
|Full Description||Use this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.
If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories,
you'll need both destination and origin inventories.
Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags.
Using "open", "clear", or "update" only require a destination.
"Update" also requires the destination to be a valid player inventory.
Using "close" closes any inventory that the currently attached player has opened.
The "adjust" option adjusts mechanisms on an item within a specific slot of an inventory (the "slot" parameter is required).
Note that this is only for items, it does NOT adjust the inventory itself. Use adjust to adjust an inventory mechanism.
The "flag" option sets a flag on items, similar to flag.
See also flag system.
The "update" option will refresh the client's view of an inventory to match the server's view, which is useful to workaround some sync bugs.
Note that to add items to an inventory, you should usually use give,
and to remove items from an inventory, you should usually use take.
The slot argument can be any valid slot, see Slot Inputs.