FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix registerCommand(Class<?>) with isolated class loaders by TheKinrar · Pull Request #698 · CommandAPI/CommandAPI · GitHub

Fix registerCommand(Class<?>) with isolated class loaders - #698

Open
TheKinrar wants to merge 1 commit into
CommandAPI:dev/devfrom
TheKinrar:fix-registerCommand-paper-plugins
Open

Fix registerCommand(Class<?>) with isolated class loaders#698
TheKinrar wants to merge 1 commit into
CommandAPI:dev/devfrom
TheKinrar:fix-registerCommand-paper-plugins

Conversation

Copy link
Copy Markdown

The new Paper variant of CommandAPI is a Paper plugin (with the paper-plugin.yml definition) so it gets an isolated class loader that cannot load classes from other plugins. Therefore it will fail to load a class generated with the annotation processor (unless CommandAPI is shaded).

This simply uses the already existing class loader to get the class locally, which is easy as we're already getting a Class, not only a name.

Copy link
Copy Markdown
Member

Uhh, I guess there's nothing wrong with this, however, if you depend on the CommandAPI plugin, shouldn't Paper put your plugin and the CommandAPI plugin on the same classpath and should therefore be able to load the classes just fine?

Copy link
Copy Markdown
Author

It's one-way only. Your plugin will be able to load CommandAPI classes, not the other way around

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL