dmulloy2 / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
982 stars 259 forks source link

java.lang.NullPointerException: Cannot invoke "java.lang.Enum.name()" because "vanilla" is null #3017

Open JericNisperos opened 1 week ago

JericNisperos commented 1 week ago

Describe the bug Our server is experiencing crash reports and it shows here this error message:

java.lang.NullPointerException: Cannot invoke "java.lang.Enum.name()" because "vanilla" is null at ProtocolLib (1).jar//com.comphenix.protocol.PacketType$Protocol.fromVanilla(PacketType.java:764) at ProtocolLib (1).jar//com.comphenix.protocol.injector.netty.channel.ChannelProtocolUtil.lambda$static$0(ChannelProtocolUtil.java:79) at java.base/java.util.function.BiFunction.lambda$andThen$0(BiFunction.java:70) at ProtocolLib (1).jar//com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.getCurrentProtocol(NettyChannelInjector.java:369) at ProtocolLib (1).jar//com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:585) at ProtocolLib (1).jar//com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:502) at ProtocolLib (1).jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) at ProtocolLib (1).jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252)

To Reproduce N/A . It only happens once or twice in a day.

Expected behavior It should run seemlessly.

Screenshots N/A. We're only getting that error message

Version Info https://mclo.gs/RYEUYzq

Additional context We already updated all our plugins that uses Protocollib. May I ask what will be the best option to resolve this?

Thank you!

dmulloy2 commented 1 week ago

This should be fixed in build 720: https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/