Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup_minecraft_lxc.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fi
# ── Download latest stable PaperMC via Fill v3 API ──
FILL_API="https://fill.papermc.io/v3/projects/paper"

LATEST_VERSION=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}" | jq -r '.versions | last')
LATEST_VERSION=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}" | jq -r '.versions | keys | last')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use semantic version ordering for latest lookup

jq '.versions | keys | last' chooses the lexicographically largest key, not the newest Minecraft version; with version strings this can select older releases (for example 1.9.x compares greater than 1.21.x as plain text). In environments where Paper exposes multiple historical versions, this will download and run an outdated server instead of the latest stable release, so the version selection needs semantic ordering (or API-provided ordering) rather than string-key ordering.

Useful? React with 👍 / 👎.

echo "Latest Minecraft version: ${LATEST_VERSION}"

BUILDS_JSON=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}/versions/${LATEST_VERSION}/builds")
Expand Down
Loading