public TransactionResult takeMoney(String player, float amount) {

        float amountToTake;
        ArrayList<Location> chests = parentPlugin.getDbConnector().getPlayersChests(player);


        //Notify the recipient
        if (parentPlugin.getFileConfig().getBoolean("Payments.notifyOnOutgoing")) {
            if (parentPlugin.getServer().getPlayer(player) != null && parentPlugin.getServer().getPlayer(player) instanceof Player) {
                parentPlugin.getServer().getPlayer(player).sendMessage(amount + " has been substracted from your account.");
            }
        }

        //Check if the overflow amount is sufficient for this transaction
        if (parentPlugin.getDbConnector().getOveflowAmount(player) >= amount) {

            if (parentPlugin.getFileConfig().getBoolean("Debug")) {
                parentPlugin.logMessage("Taking " + amount + " from " + player + "'s overflow " + parentPlugin.getDbConnector().getOveflowAmount(player));
            }

            parentPlugin.getDbConnector().setOverflowAmount(player, parentPlugin.getDbConnector().getOveflowAmount(player) - amount);

            return TransactionResult.successful;
        } else {

            if (parentPlugin.getFileConfig().getBoolean("Debug")) {
                parentPlugin.logMessage("Can not take " + amount + " from " + player + "'s overflow " + parentPlugin.getDbConnector().getOveflowAmount(player));
            }

            amountToTake = amount - parentPlugin.getDbConnector().getOveflowAmount(player);
        }

        if (getBalance(player) >= amount) {

            for (Location loc : chests) {
                amountToTake = parentPlugin.getChestInteractor().takeGold(amountToTake, ((Chest) loc.getBlock().getState())).getNotProcessed();
                if (amountToTake == 0) {
                    parentPlugin.getDbConnector().setOverflowAmount(player, amountToTake);
                    return TransactionResult.successful;
                }
            }

            parentPlugin.getDbConnector().setOverflowAmount(player, amountToTake);

            return TransactionResult.successful;
        } else {
            return TransactionResult.insufficientFunds;
        }
    }