Lib question
Hi, im in the process of making a library for my new plugins and i was wondering before i get in too deep, are players likely to turn away from a plugin if they see a dependency? Or am i just worrying about nothing?
11 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by caldev#0
eh
not really anything to worry about I’d say
you can either shade the lib into your new plugins or have it as an external provided plugin dependency
Plugins like MyWorlds use external dependencies
hell, so many plugins use protocollib
i just want to keep plugin size down by making a lib with all my most used methods if that makes sense
or would there be no benefit in doing so?
i mean go for it
if you’re going to use it across multiple plugins, no point reinventing the wheel
fairs, would it be better to shade it in or have it externally?
whatever you want
shading will make the plugin size bigger
There is a small library called Libby, which lets you load any dependency at runtime without shading it into the file. Basically the same thing as the library option in spigot 1.16.5 plus, but with support for 1.8 and any maven repo / jar file.
https://github.com/AlessioDP/libby
GitHub
GitHub - AlessioDP/libby: A runtime dependency management library f...
A runtime dependency management library for plugins running in Java-based Minecraft server platforms. - AlessioDP/libby
isn’t that literally spigot library loader
although spigot library loader only works for maven central afaik
Spigot Library Loader is useless for including your own library, because it is highly unlikely you will have the opportunity to upload it to Maven Central. Also, Spigot Library Loader is only available for 1.16.5+.
mmh
And as far as I know, Spigot Library Loader does not let you relocate the packages, which could lead to overlapping dependencies, but I'm not that sure on this one.