From e57bf9492362acc7997337535410730b99d35bb7 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Fri, 24 Apr 2020 14:54:48 +0100 Subject: [PATCH] Don't continue checking if account can hold currency if already done --- .../ChestShop/Listeners/Economy/Plugins/ReserveListener.java | 2 +- .../ChestShop/Listeners/Economy/Plugins/VaultListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/ReserveListener.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/ReserveListener.java index 2cba304..6377235 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/ReserveListener.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/ReserveListener.java @@ -123,7 +123,7 @@ public class ReserveListener extends EconomyAdapter { @EventHandler public void onCurrencyHoldCheck(CurrencyHoldEvent event) { - if (event.getAccount() == null || !transactionCanFail()) { + if (event.getAccount() == null || !transactionCanFail() || event.canHold()) { return; } diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/VaultListener.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/VaultListener.java index 6d0c1cb..b3b022d 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/VaultListener.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/Plugins/VaultListener.java @@ -230,7 +230,7 @@ public class VaultListener extends EconomyAdapter { @EventHandler public void onCurrencyHoldCheck(CurrencyHoldEvent event) { - if (!checkSetup() || event.getAccount() == null || !transactionCanFail()) { + if (!checkSetup() || event.getAccount() == null || !transactionCanFail() || event.canHold()) { return; }