Allow /eco take to subtract a user's exact balance

This commit is contained in:
md678685 2018-08-24 15:42:17 +01:00
parent 80f7ded687
commit bad02729db

View file

@ -71,7 +71,7 @@ public class Commandeco extends EssentialsLoopCommand {
private void take(BigDecimal amount, final User player, final CommandSource sender) throws ChargeException {
BigDecimal money = player.getMoney();
BigDecimal minBalance = ess.getSettings().getMinMoney();
if (money.subtract(amount).compareTo(minBalance) > 0) {
if (money.subtract(amount).compareTo(minBalance) >= 0) {
player.takeMoney(amount, sender);
} else if (sender == null) {
try {