Add HANGAR_PROJECTS to download plugins from Hangar (#4392)

This commit is contained in:
Vitalii Kotenko authored and GitHub committed 2026-11-18 19:52:29 -06:00
1 parent 0c04150581
commit 2b70dfce94
6 files changed
+82

No files matched your search

+26
View File
@@ -332,6 +332,30 @@ function handleModrinthProjects() {
fi
}
function handleHangarProjects() {
: "${HANGAR_CHANNEL:=Release}"
if [[ -v HANGAR_PROJECTS ]]; then
# Older helper builds, including Java 8, don't have the hangar command
if ! mc-image-helper has-feature hangar; then
logError "HANGAR_PROJECTS is not supported by this image variant"
exit 1
fi
if ! isType PAPER FOLIA PURPUR PUFFERFISH LEAF; then
logError "HANGAR_PROJECTS requires a Paper based TYPE, such as PAPER, FOLIA, or PURPUR"
exit 1
fi
mc-image-helper hangar \
--output-directory=/data \
--projects="${HANGAR_PROJECTS}" \
--game-version="${VERSION}" \
--platform=PAPER \
--channel="$HANGAR_CHANNEL"
fi
}
function handleCurseForgeFiles() {
args=(
--use-http2="$CF_USE_HTTP2"
@@ -387,6 +411,8 @@ handleGenericPacks
handleModrinthProjects
handleHangarProjects
if usesMods || usesPlugins; then
handleCurseForgeFiles
fi