Add missed allowLoan condition

This commit is contained in:
sandtechnology committed 2021-07-10 11:49:03 +08:00
1 parent 05f19959ac
commit 0fd75fea13
1 file changed
+1 -2
@@ -66,11 +66,10 @@ public class OngoingFeeWatcher extends BukkitRunnable {
}
World world = location.getWorld();
//We must check balance manually to avoid shop missing hell when tax account broken
if (plugin.getEconomy().getBalance(shopOwner, Objects.requireNonNull(world), shop.getCurrency()) >= cost) {
if (allowLoan || plugin.getEconomy().getBalance(shopOwner, Objects.requireNonNull(world), shop.getCurrency()) >= cost) {
Util.mainThreadRun(() -> {
EconomyTransaction transaction = EconomyTransaction.builder()
.allowLoan(allowLoan)
.amount(cost)
.currency(shop.getCurrency())
.core(plugin.getEconomy())
.world(world)