Fixed a mistake with the try-catch statements

This commit is contained in:
Matthew J. Wilkason 2019-04-12 18:47:10 -05:00 committed by GitHub
parent beedd3216c
commit 6e43897cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -135,9 +135,9 @@ public class Economy_Essentials extends AbstractEconomy {
{
try {
com.earth2me.essentials.api.Economy.add(playerName, amount);
} catch (UserDoesNotExistException e, NoLoanPermittedException ex) {
} catch (UserDoesNotExistException e) {
return false;
}
} catch (NoLoanPermittedException ex) {}
return true;
}
@ -172,7 +172,7 @@ public class Economy_Essentials extends AbstractEconomy {
type = EconomyResponse.ResponseType.FAILURE;
errorMessage = "User does not exist";
}
} catch (NoLoanPermittedException e, UserDoesNotExistException ex) {
} catch (NoLoanPermittedException e) {
try {
balance = com.earth2me.essentials.api.Economy.getMoney(playerName);
amount = 0;
@ -184,7 +184,7 @@ public class Economy_Essentials extends AbstractEconomy {
type = EconomyResponse.ResponseType.FAILURE;
errorMessage = "Loan was not permitted";
}
}
} catch(UserDoesNotExistException e) {}
return new EconomyResponse(amount, balance, type, errorMessage);
}