Spigot compiled plugin won't work on PaperMc server and can't use PaperMC as API to compile the plugin

Hi there,

I developed a small plugin a few months ago for Spigot 1.15.2

Now that we have moved to Paper 1.15.2, my plugin does not work and shows the following error message:

Java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/libs/jline/internal/log/
at com.name.PluginName.Main.onEnable(Main.java:45) ~ [?:?]

I guessed it was because my plugin was compiled with Spigot and not PaperMc but when I added the Server’s PaperMc Jar as a library to my plugin it didn’t match with anything and I got tons of errors from missing libraries.

Any clues on what’s happening? Thanks!

It’d be nice if you’d post the 45th line of your plugin main class - probably you are accessing some internal class directly instead of using the exposed API would be my guess. It looks like you are accessing the logging classes directly, which Paper changes AFAIK.

Did you try to add the Paperclip jar you downloaded from the website? If so, that’d be your issue. Neither Spigot nor Paper can redistribute Mojang code - Spigot goes around it by having you run Build Tools to compile the server yourself, Paper uses Paperclip to redistribute binary patch on top of the vanilla jar. With 1.16+ paperclip jars you can run java -Dpaperclip.install=true -jar paper.jar to install it in your local .m2 folder for maven/gradle. For 1.15 you either need to clone paper repo and compile it yourself, or you can start the server, stop it and use cache/patched.jar that is created which is the real paper jar.

Sorry, I forgot about this thread but fixed the issue. Sadly I don’t remember how I did it. Thanks so much for the help, though!

The plugin was relying on internal classes in CB, which don’t exist in paper as we ditched the outdated logger/console setup

It likely will work in 1.16 as is as I did restore those classes vs the original deletion we had.