itzg/mc-image-helper

Java version failure using spigot server for the 1.20.6 Minecraft build

JohnTorr opened this issue · 2 comments

docker run -ti \
     --name test-minecraft-start \
     -e SERVER_NAME="Test" \
     -e EULA=TRUE \
     -e DIFFICULTY=hard \
     -e TZ="Australia/Sydney" \
     -e TYPE=SPIGOT \
     itzg/minecraft-server

Results in error:

[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 1 1000 1000 0 Feb 26  2023 /data'
[init] Resolved version given LATEST into 1.20.6 and major version 1.20
[init] Resolving type given SPIGOT
[init] Downloading Spigot from https://download.getbukkit.org/spigot/spigot-1.20.6.jar ...
[init] Creating server properties in /data/server.properties
[init] Disabling whitelist functionality
[init] Setting initial memory to 1G and max to 1G
[init] Starting the Minecraft server...
Error: LinkageError occurred while loading main class org.bukkit.craftbukkit.bootstrap.Main
        java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/bootstrap/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
2024-06-01T14:21:08.820+1000    WARN    mc-server-runner        Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.        {"exitCode": 1}
2024-06-01T14:21:08.821+1000    INFO    mc-server-runner        Done

Appologies for adding this in the incorrect REPO. Also I have resolved it when I checked the correct REPO I found I need to run it with the :java21 tag rather than just :latest

Oops, meant to close