Implemented clearInventory and addItem player API functions.