Shaded packetevents and ViaVersion weird error

Has anyone encountered this error before? It happens with latest dev builds for ViaVersion, ViaBackwards and latest packetevents release Server is pufferfish 1.21.3 and probably any client, I tested with 1.21.3 and 1.8.9 The error triggers by simply pinging the server. Interesting fact: This only happens if the plugin is a paper plugin (using a paper-plugin.yml), the exact same jar with a plugin.yml doesn't trigger the error, no need to re-compile.
[18:51:32 WARN]: [net.serlith.lib.com.github.retrooper.packetevents.PacketEventsAPI] PacketEvents caught an unhandled exception while calling your listener.
java.lang.NullPointerException: Cannot invoke "net.serlith.lib.io.github.retrooper.packetevents.util.viaversion.ViaVersionAccessor.getProtocolVersion(net.serlith.lib.com.github.retrooper.packetevents.protocol.player.User)" because the return value of "net.serlith.lib.io.github.retrooper.packetevents.util.viaversion.ViaVersionUtil.getViaVersionAccessor()" is null
[18:51:32 WARN]: [net.serlith.lib.com.github.retrooper.packetevents.PacketEventsAPI] PacketEvents caught an unhandled exception while calling your listener.
java.lang.NullPointerException: Cannot invoke "net.serlith.lib.io.github.retrooper.packetevents.util.viaversion.ViaVersionAccessor.getProtocolVersion(net.serlith.lib.com.github.retrooper.packetevents.protocol.player.User)" because the return value of "net.serlith.lib.io.github.retrooper.packetevents.util.viaversion.ViaVersionUtil.getViaVersionAccessor()" is null
https://paste.helpch.at/ubobahumaz.php
Solution:
Probably related to how paper loads plugins or something like that, just adding ViaVersion as a soft dependency to load before the plugin (in paper-plugin.yml) fixes it
Jump to solution
4 Replies
Cubicake
Cubicakeโ€ข2w ago
I mean dev builds are dev builds for a reason
Solution
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
Probably related to how paper loads plugins or something like that, just adding ViaVersion as a soft dependency to load before the plugin (in paper-plugin.yml) fixes it
๐๐ข๐ช๐ฎ๐š๐ญ๐ž๐ซ๐ง๐ข๐จ๐ง๐ฌ
As for why it doesnโ€™t happen when using a regular plugin.yml :msnwhoa: :papermc:

Did you find this page helpful?