From 9869f496eb025fd4bd496823727284ec08b34648 Mon Sep 17 00:00:00 2001 From: NEZNAMY Date: Tue, 9 Feb 2021 00:41:41 +0100 Subject: [PATCH] catching errors too --- .../me/neznamy/tab/platforms/bukkit/BukkitTabPlayer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/neznamy/tab/platforms/bukkit/BukkitTabPlayer.java b/src/main/java/me/neznamy/tab/platforms/bukkit/BukkitTabPlayer.java index 67b846b5d..d7efb6bf0 100644 --- a/src/main/java/me/neznamy/tab/platforms/bukkit/BukkitTabPlayer.java +++ b/src/main/java/me/neznamy/tab/platforms/bukkit/BukkitTabPlayer.java @@ -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); } } @@ -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); } } @@ -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); } }