Add command line option to load extra plugin jars not in the plugins folder

ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
This commit is contained in:
Jason Penilla
2021-05-18 14:39:44 -07:00
parent 770ee3eebd
commit e92663406b
2 changed files with 35 additions and 0 deletions

View File

@@ -160,6 +160,12 @@ public class Main {
.ofType(File.class)
.defaultsTo(new File("paper.yml"))
.describedAs("Yml file");
acceptsAll(asList("add-plugin", "add-extra-plugin-jar"), "Specify paths to extra plugin jars to be loaded in addition to those in the plugins folder. This argument can be specified multiple times, once for each extra plugin jar path.")
.withRequiredArg()
.ofType(File.class)
.defaultsTo(new File[] {})
.describedAs("Jar file");
// Paper end
}
};