mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
Fix via dump throwing an error on sponge
This commit is contained in:
parent
f422e03348
commit
676e62c71f
@ -90,11 +90,11 @@ public class SpongePlugin implements ViaPlatform<Player> {
|
||||
|
||||
// Init platform
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.platform(this)
|
||||
.commandHandler(new SpongeCommandHandler())
|
||||
.injector(new SpongeViaInjector())
|
||||
.loader(new SpongeViaLoader(this))
|
||||
.build());
|
||||
.platform(this)
|
||||
.commandHandler(new SpongeCommandHandler())
|
||||
.injector(new SpongeViaInjector())
|
||||
.loader(new SpongeViaLoader(this))
|
||||
.build());
|
||||
conf.reload();
|
||||
}
|
||||
|
||||
@ -210,11 +210,11 @@ public class SpongePlugin implements ViaPlatform<Player> {
|
||||
for (PluginContainer plugin : game.pluginManager().plugins()) {
|
||||
PluginMetadata metadata = plugin.metadata();
|
||||
plugins.add(new PluginInfo(
|
||||
true,
|
||||
metadata.name().orElse("Unknown"),
|
||||
metadata.version().toString(),
|
||||
plugin.instance().getClass().getCanonicalName(),
|
||||
metadata.contributors().stream().map(PluginContributor::name).collect(Collectors.toList())
|
||||
true,
|
||||
metadata.name().orElse("Unknown"),
|
||||
metadata.version().toString(),
|
||||
plugin.instance() != null ? plugin.instance().getClass().getCanonicalName() : "Unknown",
|
||||
metadata.contributors().stream().map(PluginContributor::name).collect(Collectors.toList())
|
||||
));
|
||||
}
|
||||
platformSpecific.add("plugins", GsonUtil.getGson().toJsonTree(plugins));
|
||||
|
Loading…
Reference in New Issue
Block a user