diff --git a/README.md b/README.md index 0aa02ce..77d7790 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,23 @@ healthy -e PLUGINS=https://www.example.com/plugin1.jar,https://www.example.com/plugin2.jar ``` +* **PLUGINS_FILE** + + An alternative to `PLUGINS`. This variable `PLUGINS_FILE` can be set with the container path or URL of a text file listing a mod/plugin URLs on each line. For example, the following + + ``` + -e PLUGINS_FILE=/extras/plugins.txt + ``` + would load a file in the container at `/extras/plugins.txt`. The file might look like: + + ``` + https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/bungeecord + # This line will be ignored + https://download.luckperms.net/1567/bungee/loader/LuckPerms-Bungee-5.4.150.jar + ``` + + It works exactly the same as [Mod/Plugin URL Listing File for itzg/minecraft-server](https://docker-minecraft-server.readthedocs.io/en/latest/mods-and-plugins/#modsplugins-list). + * **SPIGET_PLUGINS** The `SPIGET_PLUGINS` variable can be set with a comma-separated list of SpigotMC resource IDs to automatically download [SpigotMC plugins](https://www.spigotmc.org/resources/) using [the spiget API](https://spiget.org/). Resources that are zip files will be expanded into the plugins directory and resources that are simply jar files will be moved there. diff --git a/scripts/run-bungeecord.sh b/scripts/run-bungeecord.sh index 70992dc..6316244 100644 --- a/scripts/run-bungeecord.sh +++ b/scripts/run-bungeecord.sh @@ -386,6 +386,15 @@ if [[ "$PLUGINS" ]]; then "$PLUGINS" fi +if [[ "$PLUGINS_FILE" ]]; then + mkdir -p "$BUNGEE_HOME/plugins" + mc-image-helper mcopy \ + --file-is-listing \ + --scope=file-list \ + --to="$BUNGEE_HOME/plugins" \ + "$PLUGINS_FILE" +fi + # Download plugins from spigotmc and put them in the plugins folder if [[ ${SPIGET_PLUGINS} ]]; then log "Getting plugins via Spiget"