Skip to content

Commit ca8abe3

Browse files
authored
paper: download default configs to allow for patching (#2883)
1 parent ed7a666 commit ca8abe3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/start-deployPaper

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ handleDebugMode
99
: "${PAPERBUILD:=}"
1010
: "${PAPER_DOWNLOAD_URL:=}"
1111
: "${PAPER_CUSTOM_JAR:=}"
12+
: "${PAPER_CONFIG_DEFAULTS_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}"
1213

1314
resultsFile=/data/.paper.env
1415
if [[ $PAPER_CUSTOM_JAR ]]; then
@@ -49,6 +50,13 @@ else
4950

5051
fi
5152

53+
# Download default configs to allow for consistent patching
54+
configs=(paper-global.yml paper-world-defaults.yml spigot.yml)
55+
mkdir -p config
56+
if ! get --skip-existing --log-progress-each -o config "${configs[@]/#/${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/}" 2> /dev/null; then
57+
log "WARN: one or more default PaperMC config files were not available from ${PAPER_CONFIG_DEFAULTS_REPO}"
58+
fi
59+
5260
# Normalize on Spigot for downstream operations
5361
export FAMILY=SPIGOT
5462

0 commit comments

Comments
 (0)