mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Allow /eco take to subtract a user's exact balance
This commit is contained in:
parent
80f7ded687
commit
bad02729db
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user