-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPCLib cannot run in two different plugins #79
Comments
Task #1674 for generated an exception |
Hi, thanks for creating this issue ticket! I never intended NPCLib to be used by multiple plugins at the same time. The easiest workaround right now is to strip the library from your plugin and run the NPCLib plugin (which loads all classes for you) in your server. In the meantime I'll see if I can get the system to figure out if the classes are already loaded into the JVM. EDIT 1: Another easy way you could resolve this, is by repacking the code of NPCLib and port it to a different package. Therefore it can't get duplicate classes. EDIT 2: Yep, I found a way to make it work. But it'll require some work on my end. For now I recommend one of the upper solutions. I'll publish the real solution in a major release which I'll start working on. EDIT 3: After thinking about this for a while I have come to the following conclusion; Registering the library as a service in the server will require the library to run as a standalone plugin on the server at all times. Some developers don't like doing this. They want to shade the library into their plugins. |
I'll add the solution to the README on the main page as well. Closing issue. Ticket may be reopened at any time. |
Thanks for the suggestions! |
Not a problem! Best of luck with your plugin. :) |
Describe the bug
Task #52306 for
plugin
generated an exception26.04 12:35:52 [Server] INFO java.lang.LinkageError: net/jitse/npclib/NPCLib
NPCLib JAR name
E.g. npclib-plugin-2.7.jar
Server version
1.15.2
To Reproduce
run two plugins using NPClib and see the error after trying to spawn both of them
Expected behavior
The Library will be managed to run on two or more separated plugin
The text was updated successfully, but these errors were encountered: