Don't continue checking if account can hold currency if already done

This commit is contained in:
Phoenix616 2020-04-24 14:54:48 +01:00
parent 781e017ae9
commit e57bf94923
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}