Don't assume that Velocity plugin names and versions are not present

This commit is contained in:
Camotoy 2021-06-09 18:46:34 -04:00
parent 1df6e2151d
commit a24d2a957c
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F

View file

@ -61,7 +61,7 @@ public class GeyserVelocityDumpInfo extends BootstrapDumpInfo {
for (PluginContainer plugin : proxy.getPluginManager().getPlugins()) { for (PluginContainer plugin : proxy.getPluginManager().getPlugins()) {
String pluginClass = plugin.getInstance().map((pl) -> pl.getClass().getName()).orElse("unknown"); String pluginClass = plugin.getInstance().map((pl) -> pl.getClass().getName()).orElse("unknown");
this.plugins.add(new PluginInfo(true, plugin.getDescription().getName().get(), plugin.getDescription().getVersion().get(), pluginClass, plugin.getDescription().getAuthors())); this.plugins.add(new PluginInfo(true, plugin.getDescription().getName().orElse(null), plugin.getDescription().getVersion().orElse(null), pluginClass, plugin.getDescription().getAuthors()));
} }
} }
} }