Initialisation

How to implements the API

The API is currently in development and not available from the latest version on Spigot. If you would like to try it before its official publication, please ask me on Discord.

Add ODailyQuests to your dependencies

To use the ODailyQuests API, you need to add the plugin into your dependencies, as a flat file: there is no Maven repository at the moment.

Gradle

To do it with Gradle, you firstly need to create a directory called libs, at the root of your project. Then, add this directory to the repositories section in your build.gradle file:

repositories {
    flatDir {
        dirs 'libs'
    }
}

Finally, add the plugin to the dependencies:

dependencies {
    compileOnly name: 'ODailyQuests'
}

Now, by reloading your Gradle configuration, you should have access to ODailyQuests classes.

Maven

I'm not really familiar with this mechanic in Maven. Here is the official documentation. If you know how to do it properly, feel free to send me the solution on Discord!

Get ODailyQuests & ODailyQuestsAPI instances

On your main class (or wherever you want), you can simply call the plugin instance like this:

ODailyQuests odq = ODailyQuests.INSTANCE;
ODailyQuestsAPI odqApi = odq.getApi();

Of course, ODailyQuests must be running on your server and added to your plugin dependencies. Now, you should be able to use all classes from ODailyQuests. For more information, please refer to the following pages.

Last updated