public void attemptToBuyListener(Sellable item) {
        InventoryComponent inv = Application.get().getLogic().getGame().getPlayer().getInventory();
        if(inv.getMoney() >= item.getValue()) {
            inv.removeMoney(item.getValue());
            
            // if something went wrong when buying, return the money.
            if(!item.buy()) {
                inv.addMoney(item.getValue());
            }
        }
    }