mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +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 currentBalance = account.balance().doubleValue();
|
||||||
final double amountToChange = Math.abs(currentBalance - Math.max(0d, currentBalance + amount));
|
final double amountToChange = Math.abs(currentBalance - Math.max(0d, currentBalance + amount));
|
||||||
if (amount < 0d) {
|
if (amount < 0d) {
|
||||||
account.withdrawAsync(
|
account.withdraw(BigDecimal.valueOf(amountToChange));
|
||||||
BigDecimal.valueOf(amountToChange)
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
account.depositAsync(
|
account.deposit(BigDecimal.valueOf(amountToChange));
|
||||||
BigDecimal.valueOf(amountToChange)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user