Skip to content

Add support for the new Paper Plugins.#13

Merged
AlessioDP merged 2 commits intoAlessioDP:masterfrom
kyngs:master
Apr 11, 2023
Merged

Add support for the new Paper Plugins.#13
AlessioDP merged 2 commits intoAlessioDP:masterfrom
kyngs:master

Conversation

@kyngs
Copy link
Copy Markdown

@kyngs kyngs commented Mar 19, 2023

This PR adds PaperLibraryManager which can be used to load dependencies in plugins loaded via the new Paper API (https://docs.papermc.io/paper/dev/getting-started/paper-plugins)
The BukkitLibraryManager does not work under Paper Plugins.

@4drian3d
Copy link
Copy Markdown

4drian3d commented Mar 24, 2023

I think if you are going to make a Paper plugin, you should use the dependency download API that is already included in the server. That way you avoid problems, you avoid having to relocate the dependencies in compile and runtime, among other things
I only just understood the need for this pull request, lgtm

@kyngs
Copy link
Copy Markdown
Author

kyngs commented Mar 24, 2023

While that's true for a paper only plugin, it makes things unnecessarily complicated for multiplatform plugins which have the dependency download behavior in some common class.

EDIT: Also, by using library class loader this probably isolates the dependencies similarly to how you would do it via paper API

@AlessioDP AlessioDP merged commit 463dc96 into AlessioDP:master Apr 11, 2023
@AlessioDP
Copy link
Copy Markdown
Owner

Merged, thank you for this feature :)

The only issue is that it can be compiled only with Java 16+, I will look into it but not sure how to handle that.

@frengor
Copy link
Copy Markdown
Collaborator

frengor commented Apr 12, 2023

The only issue is that it can be compiled only with Java 16+, I will look into it but not sure how to handle that.

In UltimateAdvancementAPI, we compile the project for Java 16 (for Libby it's 8), but the minimum required Java version for compiling is currently 17, since MC 19 uses Java 17. I think something like this may work for Libby as well, so simply removing Java 11 from the GitHub Action workflow file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants