Skip to content

Add CLI options to load plugins from extra jars and directories#1816

Open
vjh0107 wants to merge 1 commit into
PaperMC:dev/3.0.0from
vjh0107:feat/cli-extra-plugins
Open

Add CLI options to load plugins from extra jars and directories#1816
vjh0107 wants to merge 1 commit into
PaperMC:dev/3.0.0from
vjh0107:feat/cli-extra-plugins

Conversation

@vjh0107

@vjh0107 vjh0107 commented May 29, 2026

Copy link
Copy Markdown

Hi! This PR adds two cli options which allow loading additional plugin jars and directories in addition to the default plugins folder.

The data directory is intentionally kept fixed rather than tied to the plugin jar location. Paper takes the same approach, and since this option is likely to be used together with container volumes, which are often mounted readonly, keeping mutable data separate from the plugin binaries seems like the safer choice.

https://github.com/PaperMC/Paper/blob/216388dfdf25b365e0d3ec24748def4dcaa30a76/paper-server/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java#L176

For this reason, loadPlugins still keeps the directory argument so it can be used for the data directory.

https://github.com/vjh0107/Velocity/blob/feat/cli-extra-plugins/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityPluginManager.java#L91~L94

@WouterGritter

Copy link
Copy Markdown
Contributor

[...] container volumes, which are often mounted readonly [...]

How will this work if #1736 gets merged? Mounting a read-only volume for plugin jars would break the plugin update feature this PR is attempting to implement.

@vjh0107

vjh0107 commented May 31, 2026

Copy link
Copy Markdown
Author

The readonly thing here is only about the extra plugin paths from the new CLI options (immutable jars, e.g. mounted from a container image). #1736's update folder lives under the normal plugins/ dir, which stays writable like it is now.
So you'd just keep updatable plugins in plugins/ and put the immutable ones behind the readonly mounts. The readonly mount never touches the update folder, so nothing breaks!

@vjh0107

vjh0107 commented Jun 9, 2026

Copy link
Copy Markdown
Author

@WouterGritter If there's anything else I need to do, please feel free to tell me!

@WouterGritter

Copy link
Copy Markdown
Contributor

@WouterGritter If there's anything else I need to do, please feel free to tell me!

I'm not a maintainer with any rights on this repository, just a contributor sharing their thoughts :)

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