diff --git a/minecraft-server/README.md b/minecraft-server/README.md index 3d6763e2..ef671b4c 100644 --- a/minecraft-server/README.md +++ b/minecraft-server/README.md @@ -352,16 +352,17 @@ will be deleted when the container is deleted. you should use an IP address or a globally resolveable FQDN, or else the name of a linked container. -### Downloadable mod pack +### Downloadable mod/plugin pack for Forge, Bukkit, and Spigot Servers Like the `WORLD` option above, you can specify the URL of a "mod pack" -to download and install into the `mods` directory. To use this option -pass the environment variable `MODPACK`, such as +to download and install into `mods` for Forge or `plugins` for Bukkit/Spigot. +To use this option pass the environment variable `MODPACK`, such as docker run -d -e MODPACK=http://www.example.com/mods/modpack.zip ... -**NOTE:** The referenced URL must be a zip file with one or more Forge jar files at the -top level of the zip archive. +**NOTE:** The referenced URL must be a zip file with one or more jar files at the +top level of the zip archive. Make sure the jars are compatible with the +particular `TYPE` of server you are running. ## JVM Configuration diff --git a/minecraft-server/start-minecraft.sh b/minecraft-server/start-minecraft.sh index 05ecfabb..3dbfa371 100755 --- a/minecraft-server/start-minecraft.sh +++ b/minecraft-server/start-minecraft.sh @@ -157,11 +157,16 @@ fi if [[ "$MODPACK" ]]; then case "X$MODPACK" in X[Hh][Tt][Tt][Pp]*[Zz][iI][pP]) - echo "Downloading mod pack via HTTP" + echo "Downloading mod/plugin pack via HTTP" echo "$MODPACK" - mkdir -p /data/mods wget -q -O /tmp/modpack.zip "$MODPACK" - unzip -d /data/mods /tmp/modpack.zip + if [ "$TYPE" = "SPIGOT" ]; then + mkdir -p /data/plugins + unzip -d /data/plugins /tmp/modpack.zip + else + mkdir -p /data/mods + unzip -d /data/mods /tmp/modpack.zip + fi rm -f /tmp/modpack.zip ;; *)