mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
fabric: move off impactor economy deprecated API methods
This commit is contained in:
1 file changed
+2
-6
@@ -63,13 +63,9 @@ public class FabricImpactorEconomyHook extends EconomyHook {
|
||||
final double currentBalance = account.balance().doubleValue();
|
||||
final double amountToChange = Math.abs(currentBalance - Math.max(0d, currentBalance + amount));
|
||||
if (amount < 0d) {
|
||||
account.withdrawAsync(
|
||||
BigDecimal.valueOf(amountToChange)
|
||||
);
|
||||
account.withdraw(BigDecimal.valueOf(amountToChange));
|
||||
} else {
|
||||
account.depositAsync(
|
||||
BigDecimal.valueOf(amountToChange)
|
||||
);
|
||||
account.deposit(BigDecimal.valueOf(amountToChange));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user