add Item
Stores the given ItemStacks in the inventory. This will try to fill existing stacks and empty slots as well as it can.
The returned HashMap contains what it couldn't store, where the key is the index of the parameter, and the value is the ItemStack at that index of the varargs parameter. If all items are stored, it will return an empty HashMap.
If you pass in ItemStacks which exceed the maximum stack size for the Material, first they will be added to partial stacks where Material.getMaxStackSize() is not exceeded, up to Material.getMaxStackSize(). When there are no partial stacks left stacks will be split on Inventory.getMaxStackSize() allowing you to exceed the maximum stack size for that material.
Return
A HashMap containing items that didn't fit.
Parameters
The ItemStacks to add
Throws
if items or any element in it is null