if (account == null) {
return new EconomyResponse(0, 0, ResponseType.FAILURE, "That account does not exist!");
} else if (!account.hasBalance(amount)) {
return new EconomyResponse(0, account.getBalance(), ResponseType.FAILURE, "That account does not have enough!");
} else {
account.subtractBalance(amount);
return new EconomyResponse(amount, account.getBalance(), ResponseType.SUCCESS, "");
}
}
@Override