mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-09-30 08:07:34 +02:00
Use broader catch statement when dealing with other metrics plugins
Fixes #488
This commit is contained in:
parent
3ccc56fef9
commit
fc76af9d56
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user