diff --git a/.github/workflows/auto-bump-hytale.yml b/.github/workflows/auto-bump-hytale.yml new file mode 100644 index 0000000..a402456 --- /dev/null +++ b/.github/workflows/auto-bump-hytale.yml @@ -0,0 +1,67 @@ +name: Auto-bump Hytale Server + +on: + schedule: + - cron: '17 6 * * *' + workflow_dispatch: + +permissions: + contents: write + +jobs: + bump: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + + - name: Resolve latest Hytale Server release + id: latest + run: | + set -euo pipefail + curl -sfL -o /tmp/metadata.xml \ + https://maven.hytale.com/release/com/hypixel/hytale/Server/maven-metadata.xml + LATEST=$(python3 -c "import xml.etree.ElementTree as E; print(E.parse('/tmp/metadata.xml').getroot().findtext('versioning/release'))") + if [ -z "$LATEST" ]; then + echo "Failed to parse from maven-metadata.xml" >&2 + exit 1 + fi + echo "version=$LATEST" >> "$GITHUB_OUTPUT" + + - name: Read current property + id: current + run: | + set -euo pipefail + CURRENT=$(python3 -c "import xml.etree.ElementTree as E; ns={'m':'http://maven.apache.org/POM/4.0.0'}; print(E.parse('pom.xml').getroot().find('m:properties/m:hytale.server.version', ns).text)") + echo "version=$CURRENT" >> "$GITHUB_OUTPUT" + + - name: Skip if unchanged + if: steps.latest.outputs.version == steps.current.outputs.version + run: echo "Already on ${{ steps.current.outputs.version }}" + + - name: Update pom.xml + if: steps.latest.outputs.version != steps.current.outputs.version + run: | + sed -i "s|[^<]*|${{ steps.latest.outputs.version }}|" pom.xml + + - name: Verify build + if: steps.latest.outputs.version != steps.current.outputs.version + run: mvn clean package -B -ntp -DskipTests + + - name: Commit and push + if: steps.latest.outputs.version != steps.current.outputs.version + run: | + set -euo pipefail + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add pom.xml + git commit -m "chore: bump Hytale server to ${{ steps.latest.outputs.version }}" + git push diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a03a9b2..9786d9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,11 +29,6 @@ jobs: distribution: 'temurin' cache: maven - - name: Download HytaleServer - run: | - mkdir -p libs - curl -sfL -o libs/HytaleServer.jar "${{ secrets.HYTALE_SERVER_JAR_URL }}" - - name: Build with Maven run: mvn clean package -B -DskipTests diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index da34e87..5f0a8f8 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -143,6 +143,8 @@ Offset Size Field ... 2 Port (uint16) - only if FLAG_HAS_ADDRESS ``` +> **Protocol Hash**: opaque identifier of the Hytale server's wire protocol, used by clients to detect protocol mismatch. Treat as an opaque string; do not parse. Since Hytale Update 4 (2026-03-26) this is an 8-character uppercase hex encoding of `ProtocolSettings.PROTOCOL_CRC` (CRC32). Earlier servers provided a different hash string. The field name is retained for wire compatibility. + ### Player List (Type 0x0002) Returned for PLAYERS queries. diff --git a/pom.xml b/pom.xml index 2a96d73..927ac62 100644 --- a/pom.xml +++ b/pom.xml @@ -9,20 +9,27 @@ ${revision} - 2.0.1-SNAPSHOT + 2.0.2-SNAPSHOT 21 21 UTF-8 6.3.2.RELEASE + 2026.03.26-89796e57b + + + hytale-release + https://maven.hytale.com/release + + + com.hypixel.hytale - hytale-server - 1.0-SNAPSHOT - system - ${project.basedir}/libs/HytaleServer.jar + Server + ${hytale.server.version} + provided @@ -42,6 +49,33 @@ + + io.github.projectunified + hytale-manifest-maven-plugin + 1.2.1 + + + + generateManifest + + + + +
dev.hytaleone.query.OneQueryPlugin
+ HytaleOne + OneQuery + https://hytale.one + Lightweight UDP query protocol for server status. Supports multi-server networks with combined player counts and player lists. + ${hytale.server.version} + + + HytaleOne + https://hytale.one + + +
+
+ org.apache.maven.plugins maven-surefire-plugin diff --git a/src/main/java/dev/hytaleone/query/protocol/ServerDataProvider.java b/src/main/java/dev/hytaleone/query/protocol/ServerDataProvider.java index 2ef439e..244453f 100644 --- a/src/main/java/dev/hytaleone/query/protocol/ServerDataProvider.java +++ b/src/main/java/dev/hytaleone/query/protocol/ServerDataProvider.java @@ -106,7 +106,7 @@ public static int getProtocolVersion() { @Nonnull public static String getProtocolHash() { - return ProtocolSettings.PROTOCOL_HASH; + return String.format("%08X", ProtocolSettings.PROTOCOL_CRC); } @Nonnull diff --git a/src/main/resources/manifest.json b/src/main/resources/manifest.json deleted file mode 100644 index 41ec811..0000000 --- a/src/main/resources/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "Group": "HytaleOne", - "Name": "OneQuery", - "Version": "2.0.1", - "Authors": [ - { - "Name": "HytaleOne", - "Url": "https://hytale.one" - } - ], - "Website": "https://hytale.one", - "Main": "dev.hytaleone.query.OneQueryPlugin", - "ServerVersion": "*", - "Description": "Lightweight UDP query protocol for server status. Supports multi-server networks with combined player counts and player lists." -}