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


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
Was this page helpful?