fabric: move off impactor economy deprecated API methods

This commit is contained in:
William committed 2024-04-01 14:48:45 +01:00
1 parent 5dd897c601
commit 865243873e
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));
}
}