So confusing on what you want..so I'll do my best.
Usage for grabbing the players inventory as an Item array:
inventory.getItems()
Since you want to store their initial setup, I'd do something like:
initial = inventory.getItems() upon startup
To grab the amount of an item object (returned as an integer), simply do:
item.getAmount()
Put it all together, you should end up with something like this:
for (int i = 0; i < inventory.getItems().length; i++) {
Item current = inventory.getItems()[i]; //the current item in the respective slot
Item in = initial[i]; //the initial item in the respective slot
//probably want to skip iteration if the item is null but idk
if (in.getAmount() != current.getAmount()) { //if the initial amount is different to the current amount...
bank.withdraw(current.getId(), in.getAmount() - current.getAmount()); //withdraw the necessary amount
}
}