Tinyprotocol breaks if ran on Paper compiled with Java 11
espen96 opened this issue ยท 3 comments
Describe the bug
If a plugin using TinyProtocol is ran on a paper server that was compiled using Java 11, the plugin will fail to start citing "Java.lang.IllegalStateException: Unable to find method null ([class net.minecraft.server.v1_15_R1.ServerConnection])."
as seen here:
https://pastebin.com/S8vvHN2q
https://github.com/BananaPuncher714/Cartographer2
To Reproduce
Steps to reproduce the behavior:
- Compile Paper using Java 11 in the POM instead of 1.8
- run the server with a plugin that uses TinyProtocol
- See error
Expected behavior
Plugin should start without issues.
I just found a fix: The return type of the method we are trying to search for got changed in paper spigot. It was java.util.List but now it is java.util.Queue.
So just search for the "List" return type first and if that fails search for the "Queue" return.
To add some information, the reason Java 11 breaks is because the synthetic method that existed in the java 8 class does not exist in the java 11 class.
@dmulloy2 bump