Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download default configs when deploying Purpur and Pufferfish #3221

Open
Krymonota opened this issue Jan 2, 2025 · 1 comment
Open

Download default configs when deploying Purpur and Pufferfish #3221

Krymonota opened this issue Jan 2, 2025 · 1 comment

Comments

@Krymonota
Copy link
Contributor

Enhancement Type

Improve an existing feature

Describe the enhancement

Since Purpur and Pufferfish are forks of Paper, it would be nice to download the same default configurations as for Paper. They are compatible because Purpur and Pufferfish have separate configuration files (purpur.yml / pufferfish.yml) for fork-specific features.

Essentially, we would simply have to extract this code into a reusable function/script and invoke it from start-deployPaper, start-deployPurpur and start-deployPufferfish.

defaultTopLevelConfigs="bukkit.yml spigot.yml"
if versionLessThan 1.19; then
defaultTopLevelConfigs+=" paper.yml"
else
# Download default configs to allow for consistent patching
DOWNLOAD_DEFAULT_CONFIGS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" paper-global.yml paper-world-defaults.yml)
export DOWNLOAD_DEFAULT_CONFIGS
fi
# Download top-level configs to allow for consistent patching
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" $defaultTopLevelConfigs)
export DOWNLOAD_DEFAULTS

And we would have to think about what to do with this environment variable (keep the same name for forks, rename it, ...?):

: "${PAPER_CONFIG_DEFAULTS_REPO:=${PAPER_CONFIG_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}}"

@itzg
Copy link
Owner

itzg commented Jan 2, 2025

Great suggestions.

Perhaps for the variable it should be shifted to just CONFIG_DEFAULTS_REPO and used for all of them. The downside I can think is now it could seem applicable to non-Paper derivatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants