API

Developer API Guide

The API allows developers to access registered quests and to progress quests/quest pools for players. You can also register Custom reward types and reward auto-correctors.

Add the API to your project

Maven

You might also need to include Aikars ACF repo if you are using maven.

pom.xml
<repository>
    <id>auroramc</id>
    <url>https://repo.auroramc.gg/releases/</url>
</repository>
pom.xml
<dependency>
    <groupId>gg.auroramc</groupId>
    <artifactId>AuroraQuests</artifactId>
    <version>{VERSION}</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>gg.auroramc</groupId>
    <artifactId>Aurora</artifactId>
    <version>{VERSION}</version>
    <scope>provided</scope>
</dependency>

Gradle (Groovy)

build.gradle
repositories {
    maven {
        url "https://repo.auroramc.gg/releases/"
    }
}

dependencies {
    compileOnly 'gg.auroramc:Aurora:{VERSION}'
    compileOnly 'gg.auroramc:AuroraQuests:{VERSION}'
}

Gradle (Kotlin)

build.gradle.kts
repositories { 
    maven("https://repo.auroramc.gg/releases/")
}

dependencies { 
    compileOnly("gg.auroramc:Aurora:{VERSION}")
    compileOnly("gg.auroramc:AuroraQuests:{VERSION}")
}

Get the API instance

import gg.auroramc.quests.api.AuroraQuestsProvider;
import gg.auroramc.quests.api.quest.QuestManager;

QuestManager manager = AuroraQuestsProvider.getQuestManager()

You can view how to add Custom rewards and correctors for them here. However, you will need to register them through the QuestManager.

Last updated