Skip to content

Installation

Samuel De Oliveira edited this page Jan 7, 2026 · 1 revision

📥 Installation Guide

This guide will help you add DreamAPI to your Minecraft plugin project.


Prerequisites

Before installing DreamAPI, ensure you have:

  • Java 21 or higher
  • 🎮 Paper 1.21.10 or higher
  • 🔨 Maven or Gradle build tool

Maven Installation

1. Add JitPack Repository

Add the JitPack repository to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

2. Add DreamAPI Dependency

Add the dependency to your pom.xml:

<dependency>
    <groupId>com.github.Dreamin-MC</groupId>
    <artifactId>DreamAPI</artifactId>
    <version>0.0.6:all</version>
    <scope>provided</scope>
</dependency>

3. Configure Java Version

Ensure Java 21 is configured:

<properties>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
</properties>

Gradle Installation (Groovy)

1. Add JitPack Repository

Add to your build.gradle:

repositories {
    maven { url 'https://jitpack.io' }
}

2. Add DreamAPI Dependency

dependencies {
    implementation 'com.github.Dreamin-MC:DreamAPI:0.0.6:all'
}

3. Configure Java Version

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

Gradle Installation (Kotlin DSL)

1. Add JitPack Repository

Add to your build.gradle.kts:

repositories {
    maven("https://jitpack.io")
}

2. Add DreamAPI Dependency

dependencies {
    implementation("com.github.Dreamin-MC:DreamAPI:0.0.6:all")
}

3. Configure Java Version

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(21))
    }
}

Verify Installation

Create a test class to verify the installation:

import fr.dreamin.dreamapi.api.DreamAPI;

public class TestPlugin extends DreamPlugin {
  @Override
  public void onDreamEnable() {
    getLogger().info("DreamAPI is good");
  }
}

If it compiles without errors, you're ready to go! 🎉


Next Steps


Troubleshooting

Compilation Errors

If you get compilation errors:

  1. Verify Java 21 is installed: java -version
  2. Ensure your IDE is configured for Java 21
  3. Run mvn clean install or gradle clean build

Runtime Errors

If you get runtime errors:

  1. Ensure Paper 1.21.10+ is being used
  2. Check that DreamAPI is in the server plugins folder
  3. Verify plugin.yml has correct API version

For more help, see Troubleshooting.

Clone this wiki locally