Closed dajix350 closed 1 year ago
Perhaps, but some plugins aren't on Modrinth and some don't host their files on their either. Take FastAsyncWorldEdit, you can only download from their Jenkins page. This means that it's impossible to support plugins that use the "external download" feature, which is honestly quite alot.
I might make a fallback option (eg. a plugin isn't found so maybe it can be installed on modrinth or spigot) and verify that it hosts it's files there and etc... But I will probably do that post-1.0. Still an interesting feature to think about for sure.
I've thought about it and realized that it's definitely a needed feature considering the huge amount of plugins there are. Perhaps a kind of prefix could do, for example: spigot:worldedit, or maybe it could be a fallback? Still debating, let me know what you think.
AFAIK the Spigot forums don't have an API or consistent download links. If thats the case, to make SpigotMC a plugin source you would need to build a web scraper which is probably beyond the scope of this project.
For Modrinth, a fallback from searching your repository would work.
Also, if you did implement Modrinth plugins, then in the future if you look into Fabric/Quilt support you will already have the Modrinth API implemented, so getting server-side mods will be easy.
I decided to add a command to generate pap json files from modrinth. This also comes with the feature to directly install modrinth by prefixing the slug with modrinth
like this:
pap plugin install modrinth:essentialsx
This has now also been implemented with spigotmc plugins, although it's less consistent:
pap plugin install spigotmc:death_signs
I think adding support for bukkit.dev should be enough for this. It's probably excessive, but will make adding new plugins a whole lot easier, and it will also make pap sort of a combination of all three.
This has been implemented fully, and I think it's a good time to close it.
Modrinth already has a repository of plugins, so you won't need to reinvent the wheel. It has an API that the plugin "package manager" could connect to.