mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Allow /eco take to subtract a user's exact balance
This commit is contained in:
parent
80f7ded687
commit
bad02729db
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue