Skip to main content

Prerequisites

Before installing MCReleaser CLI, ensure you have:
  • Java 17 or higher installed on your system
  • Access to download the MCReleaser JAR file
You can verify your Java version by running java -version in your terminal.

Installation

1

Download the JAR file

Download the latest mcreleaser.jar file from the releases page or build it from source.To build from source:
git clone https://github.com/HSGamer/MCReleaser.git
cd MCReleaser
mvn clean package
The JAR file will be located at cli/target/mc-releaser-cli-*.jar
2

Verify the download

Ensure the JAR file is executable and accessible:
ls -lh mcreleaser.jar
3

Run MCReleaser

Execute MCReleaser with the required parameters:
java \
  -Dname="Your Plugin Name" \
  -Dversion="1.0.0" \
  -Ddescription="Your plugin description" \
  -DgameVersions="1.20.1,1.20.4" \
  -jar mcreleaser.jar

Usage

Basic Example

Publish a Minecraft plugin to multiple platforms:
java \
  -Dname="MyAwesomePlugin" \
  -Dversion="2.3.1" \
  -Ddescription="A plugin that does amazing things" \
  -DgameVersions="1.19.4,1.20.1,1.20.4" \
  -jar mcreleaser.jar

With Platform Configuration

Include platform-specific tokens and settings:
java \
  -Dname="MyPlugin" \
  -Dversion="1.0.0" \
  -Ddescription="A great Minecraft plugin" \
  -DgameVersions="1.20.1,1.20.4" \
  -DmodrinthToken="YOUR_MODRINTH_TOKEN" \
  -DmodrinthProject="your-project-id" \
  -DmodrinthLoaders="paper,spigot" \
  -DhangarKey="YOUR_HANGAR_KEY" \
  -DhangarProject="YourUsername/YourProject" \
  -DhangarChannel="Release" \
  -jar mcreleaser.jar

Environment Variables as Properties

When using the CLI, environment variables must be converted to Java system properties using the -D flag with camelCase naming.
Conversion rules:
  • Remove underscores
  • Convert to camelCase
  • Prefix with -D
Examples:
Environment VariableCLI Property
GITHUB_TOKEN-DgithubToken
MODRINTH_PROJECT-DmodrinthProject
GAME_VERSIONS-DgameVersions
HANGAR_KEY-DhangarKey
CURSEFORGE_TOKEN-DcurseforgeToken

Script Example

Create a reusable shell script for easier execution:
publish.sh
#!/bin/bash

# Configuration
PLUGIN_NAME="MyPlugin"
PLUGIN_VERSION="1.0.0"
PLUGIN_DESC="A great Minecraft plugin"
GAME_VERSIONS="1.20.1,1.20.4"

# Run MCReleaser
java \
  -Dname="$PLUGIN_NAME" \
  -Dversion="$PLUGIN_VERSION" \
  -Ddescription="$PLUGIN_DESC" \
  -DgameVersions="$GAME_VERSIONS" \
  -DmodrinthToken="$MODRINTH_TOKEN" \
  -DmodrinthProject="$MODRINTH_PROJECT" \
  -DmodrinthLoaders="paper,spigot" \
  -DhangarKey="$HANGAR_KEY" \
  -DhangarProject="$HANGAR_PROJECT" \
  -DhangarChannel="Release" \
  -jar mcreleaser.jar
Make it executable and run:
chmod +x publish.sh
./publish.sh
For detailed configuration options and environment variables, see the Configuration section.

Troubleshooting

Java Version Issues

If you encounter errors about unsupported class versions:
Error: A JNI error has occurred
Ensure you’re using Java 17 or higher:
java -version

Missing Dependencies

If the JAR fails to find required libraries, ensure the lib/ directory is in the same location as the JAR file.

Next Steps

Configuration

Learn about all available configuration options

Platforms

Configure platform-specific settings

Build docs developers (and LLMs) love