ProtocolLib
ProtocolLib copied to clipboard
Java 15 Incompatibility
Describe the bug Run the ProtocolLib on a Java 15 server and then join. Let the errors begin!
To Reproduce
- Run Java 15 on a server
- Join the server
- Errors!
Expected behavior No errors!
Screenshots
net.minecraft.server.v1_16_R3.ReportedException: Sending packet
at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1434) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:378) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1269) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1001) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:179) ~[patched_1.16.4.jar:git-Tuinity-"d1db107"]
at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.IllegalStateException: Cannot use reflection.
at com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor.set(DefaultFieldAccessor.java:30) ~[?:?]
at com.comphenix.protocol.injector.netty.ChannelInjector$3.handleScheduled(ChannelInjector.java:353) ~[?:?]
at com.comphenix.protocol.injector.netty.ChannelInjector$3.onMessageScheduled(ChannelInjector.java:317) ~[?:?]
at com.comphenix.protocol.injector.netty.ChannelProxy$2.schedulingRunnable(ChannelProxy.java:127) ~[?:?]
at com.comphenix.protocol.injector.netty.EventLoopProxy.execute(EventLoopProxy.java:95) ~[?:?]
Version Info Using the latest 1.16 ProtocolLib from Jenkins
Additional context Not using protocol lib will not throw any errors on Java 15. Using another version of Java like 11 or 8 won't throw errors either.
What to do with it?
Half a year ago we had the same error, but we could fix it. I don't really know how to fix this in detail, but our problem was the outdated ProtocolLib version. So, to put it in a nutshell: Use the heighest ProtocoLlib version for your server version and the corresponding Java version to the ProtocolLib version. Normaly, using the newest ProtocolLib and Java version works absolutely fine.