Use broader catch statement when dealing with other metrics plugins

Fixes #488
This commit is contained in:
Dan Mulloy 2018-07-09 22:31:03 -04:00
parent 3ccc56fef9
commit fc76af9d56

View File

@ -261,9 +261,9 @@ public class Metrics {
for (RegisteredServiceProvider<?> provider : Bukkit.getServicesManager().getRegistrations(service)) { for (RegisteredServiceProvider<?> provider : Bukkit.getServicesManager().getRegistrations(service)) {
try { try {
pluginData.add(provider.getService().getMethod("getPluginData").invoke(provider.getProvider())); pluginData.add(provider.getService().getMethod("getPluginData").invoke(provider.getProvider()));
} catch (NullPointerException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { } } catch (Exception ignored) { }
} }
} catch (NoSuchFieldException ignored) { } } catch (Exception ignored) { }
} }
data.put("plugins", pluginData); data.put("plugins", pluginData);