Skip to content

Commit

Permalink
catching errors too
Browse files Browse the repository at this point in the history
  • Loading branch information
NEZNAMY committed Feb 8, 2021
1 parent decbaa7 commit 9869f49
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private boolean isDisguisedLD() {
try {
if (!Bukkit.getPluginManager().isPluginEnabled("LibsDisguises")) return false;
return (boolean) Class.forName("me.libraryaddict.disguise.DisguiseAPI").getMethod("isDisguised", Entity.class).invoke(null, player);
} catch (Exception e) {
} catch (Throwable e) {
return TAB.getInstance().getErrorManager().printError(false, "Failed to check disguise status using LibsDisguises", e);
}
}
Expand All @@ -134,7 +134,7 @@ private boolean isDisguisediDis() {
Method m = iDisguise.getClass().getMethod("isDisguised", Player.class);
m.setAccessible(true);
return (boolean) m.invoke(iDisguise, player);
} catch (Exception e) {
} catch (Throwable e) {
return TAB.getInstance().getErrorManager().printError(false, "Failed to check disguise status using iDisguise", e);
}
}
Expand All @@ -143,7 +143,7 @@ private boolean isDisguisediDis() {
public Object getSkin() {
try {
return Class.forName("com.mojang.authlib.GameProfile").getMethod("getProperties").invoke(NMSHook.nms.getProfile.invoke(NMSHook.nms.getHandle.invoke(player)));
} catch (Exception e) {
} catch (Throwable e) {
return TAB.getInstance().getErrorManager().printError(null, "Failed to get skin of " + getName(), e);
}
}
Expand Down

0 comments on commit 9869f49

Please sign in to comment.