Skip to content

API Dependency Guide

Lachlan edited this page Jun 23, 2023 · 1 revision

This page is complete and is valid as of Treasury v2.0.0.

ℹ️ To use Treasury in your project, you'll need to import it so your IDE recognizes the API's code.

Quick Navigation

ℹ️ Click on a link to navigate.

  1. MrIvanPlays Repository
  2. CodeMC Repository
  3. JitPack Repository

Dependency Guide

ℹ️ MrIvanPlays is a Treasury maintainer, who is kindly hosting a maven repository with Treasury on it, also hosting Treasury's javadocs and a jenkins job, where you can download Treasury plugin from. It has high uptime and speed, and Ivan is very easy to contact if there are any issues. In addition to Ivan's repository, we also support using the alternative repositories (listed below) to achieve additional redundancy and more choice for developers. It has the least load out of all of the repositories listed, so it should also be the fastest to build.

Maven

If you are using any other library of MrIvanPlays's, you can replace your current repo.mrivanplays.com repository with:

<repositories>
    <repository>
        <id>maven-all</id>
        <url>https://repo.mrivanplays.com/repository/maven-all/</url>
    </repository>
</repositories>

Otherwise this is the repository you want to use to pull Treasury:

<repositories>
    <repository>
        <id>other-developers</id>
        <url>https://repo.mrivanplays.com/repository/other-developers/</url>
    </repository>
</repositories>

Add the dependency:

⚠️ Make sure you change the version! The latest API verison is listed on Treasury's resource page on SpigotMC.

<dependencies>
    <dependency>
        <groupId>me.lokka30</groupId>
        <artifactId>treasury-api</artifactId>
        <version><!-- PUT THE LATEST API VERSION HERE --></version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Gradle

If you are using any other library of MrIvanPlays's, you can replace your current repo.mrivanplays.com repository with:

repositories {
    maven { url 'https://repo.mrivanplays.com/repository/maven-all/' }
}

Otherwise this is the repository you want to use to pull Treasury:

repositories {
    maven { url 'https://repo.mrivanplays.com/repository/other-developers/' }
}

Add the dependency:

⚠️ Make sure you change the version! The latest API verison is listed on Treasury's resource page on SpigotMC.

dependencies {
    compileOnly "me.lokka30:treasury-api:PUT-THE-LATEST-API-VERSION-HERE"
}

Treasury on CodeMC

CodeMC is a respected community which kindly offers a CI and Nexus repository, both of which Treasury utilizes.

Maven

Add the repository:

<repositories>
    <repository>
        <id>CodeMC</id>
        <url>https://repo.codemc.org/repository/maven-public</url>
    </repository>
</repositories>

Add the dependency:

⚠️ Make sure you change the version! The latest API verison is listed on Treasury's resource page on SpigotMC.

<dependencies>
    <dependency>
        <groupId>me.lokka30</groupId>
        <artifactId>treasury-api</artifactId>
        <version><!-- PUT THE LATEST API VERSION HERE --></version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Gradle

Add the repository:

repositories {
    maven { url 'https://repo.codemc.org/repository/maven-public' }
}

Add the dependency:

⚠️ Make sure you change the version! The latest API verison is listed on Treasury's resource page on SpigotMC.

dependencies {
    compileOnly "me.lokka30:treasury-api:PUT-THE-LATEST-API-VERSION-HERE"
}

⚠️ JitPack is not serving the latest commit for v1.1.0 for some reason, even after commanding it to delete the build a few times. Use the MrIvanPlays or CodeMC repository instead (make sure to also edit the dependency).

Treasury on JitPack

For those who just want a third option - we've got you covered. JitPack can build specific commits, releases, branches, etc for you, upon request.

Maven

Add the repository:

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

Add the dependency:

⚠️ Make sure you change the version! The latest API verison is listed on Treasury's resource page on SpigotMC.

<dependencies>
    <dependency>
        <groupId>com.github.lokka30.treasury</groupId>
        <artifactId>treasury-api</artifactId>
        <version><!-- PUT THE LATEST API VERSION HERE --></version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Gradle

Add the repository:

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

Add the dependency:

⚠️ Make sure you change the version! The latest API verison is listed on Treasury's resource page on SpigotMC.

dependencies {
    compileOnly "com.github.lokka30.treasury:treasury-api:PUT-THE-LATEST-API-VERSION-HERE"
}

Available APIs

Please see the Wiki navigation sidebar for the list of APIs we have to offer. More will be on their way in the future! :)

Clone this wiki locally