Skip to content
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

Add support for the new Paper Plugins. #13

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Conversation

kyngs
Copy link

@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

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
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
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
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