diff --git a/Dockerfile b/Dockerfile index 8dcb409..7bab8b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ COPY --chmod=444 templates/ /templates/ -ARG MC_HELPER_VERSION=1.32.4 +ARG MC_HELPER_VERSION=1.33.3 ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} # used for cache busting local copy of mc-image-helper ARG MC_HELPER_REV=1 diff --git a/scripts/run-bungeecord.sh b/scripts/run-bungeecord.sh index 38d9f46..852588f 100644 --- a/scripts/run-bungeecord.sh +++ b/scripts/run-bungeecord.sh @@ -18,6 +18,9 @@ : "${REPLACE_ENV_VARIABLE_PREFIX:=${ENV_VARIABLE_PREFIX:-CFG_}}" : "${REPLACE_ENV_VARIABLES_EXCLUDES:=}" : "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}" +: "${MODRINTH_PROJECTS:=}" +: "${MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES:=true}" +: "${MODRINTH_ALLOWED_VERSION_TYPE:=release}" BUNGEE_HOME=/server RCON_JAR_URL=https://github.com/orblazer/bungee-rcon/releases/download/v${RCON_JAR_VERSION}/bungee-rcon-${RCON_JAR_VERSION}.jar @@ -358,10 +361,11 @@ fi # If supplied with a URL for a plugin download it. if [[ "$PLUGINS" ]]; then mkdir -p "$BUNGEE_HOME/plugins" - if ! get --skip-existing -o "$BUNGEE_HOME/plugins" "$PLUGINS"; then - echo "ERROR: failed to download plugin(s)" - exit 1 - fi + mc-image-helper mcopy \ + --glob=*.jar \ + --scope=var-list \ + --to="$BUNGEE_HOME/plugins" \ + "$PLUGINS" fi if [[ ${SPIGET_PLUGINS} ]]; then @@ -377,6 +381,16 @@ if [[ ${SPIGET_PLUGINS} ]]; then done fi +if [[ $MODRINTH_PROJECTS ]] then + mc-image-helper modrinth \ + --output-directory=/data \ + --projects="${MODRINTH_PROJECTS}" \ + --game-version="${VERSION}" \ + --loader="${family}" \ + --download-optional-dependencies="${MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES}" \ + --allowed-version-type="${MODRINTH_ALLOWED_VERSION_TYPE}" +fi + # Download rcon plugin if [[ "${family}" == "velocity" ]] || isTrue "${APPLY_VELOCITY_RCON:-false}"; then # Download UnioDex/VelocityRcon plugin if isTrue "${ENABLE_RCON}"; then