description |
---|
Describes how to add Minestom as a dependency in your project. |
{% hint style="info" %} Minestom needs Java 21 or newer in order to run. If you are using Gradle, you must use version 7.2 or higher. {% endhint %}
Adding Minestom to your Java project is really simple, you only need to add a few repositories:
{% tabs %} {% tab title="Gradle (Groovy)" %}
repositories {
// ...
mavenCentral()
maven { url 'https://jitpack.io' }
}
{% endtab %}
{% tab title="Gradle (Kotlin)" %}
repositories {
// ...
mavenCentral()
maven(url = "https://jitpack.io")
}
{% endtab %}
{% tab title="Maven" %}
<repositories>
<!-- ... -->
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Gradle (Groovy)" %}
dependencies {
// ...
implementation 'com.github.Minestom:Minestom:VERSION'
}
{% endtab %}
{% tab title="Gradle (Kotlin)" %}
dependencies {
//...
implementation("com.github.Minestom:Minestom:VERSION")
}
{% endtab %}
{% tab title="Maven" %}
<dependencies>
<!-- ... -->
<dependency>
<groupId>com.github.Minestom</groupId>
<artifactId>Minestom</artifactId>
<version>VERSION</version>
<exclusions>
<exclusion>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
When using Maven it is recommended to exclude the artifact shrinkwrap-resolver-depchain
from the group org.jboss.shrinkwrap.resolver
as otherwise resolving the dependencies will fail. Shrinkwrap can be added as a separate dependency if needed without issues to restore its functionality.
{% endtab %}
{% endtabs %}
A list of versions can be found at https://jitpack.io/#Minestom/Minestom.