return new EconomyResponse(value, balance - value, ResponseType.SUCCESS, null);
}
@Override
public EconomyResponse depositPlayer (String playerName, double amount) {
Account account = api.getAccount(playerName);
if (account == null) {
// Stupid plugins that use fake players without creating them first...
// return new EconomyResponse(0, 0, ResponseType.FAILURE, "Player doesn't exist");
this.createPlayerAccount(playerName);
}
int value = (int) amount;
int balance = account.getBalance();
if (value < 1) {
return new EconomyResponse(0, balance, ResponseType.FAILURE, api.getMsg("LessThanZero"));
}
account.addTaxableIncome(value);
return new EconomyResponse(value, balance + value, ResponseType.SUCCESS, null);
}