Skip to content

Setup Minecraft

Actions
Setup a Minecraft server
v3.3.2
Latest
Star (23)

setup-minecraft

Test

This action downloads a specific version of Minecraft: Java Edition1.

Inputs

Name Description Default
version Minecraft version to use. release
install Whether to install Minecraft. true
cache Whether to cache Minecraft. false
retries Number of retries to download Minecraft. 3

Outputs

Name Description
version Minecraft version used.
package Package used.

Example usage

- uses: actions/checkout@v4
- id: minecraft
  uses: mcenv/setup-minecraft@v3
  with:
    version: "1.20.2"
- uses: actions/setup-java@v3
  with:
    distribution: "microsoft"
    java-version: ${{ fromJson(steps.minecraft.outputs.package).javaVersion.majorVersion }}
- run: |
    echo Running Minecraft ${{ steps.minecraft.outputs.version }}.
    echo "eula=true" > eula.txt
    java -jar $MINECRAFT nogui

Footnotes

  1. NOT OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG.

Setup Minecraft is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Setup a Minecraft server
v3.3.2
Latest

Setup Minecraft is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.