Blocksmith logo
NextCollectors

Developer API Introduction

You can use NextCollectors API that we provide to customize to your likings!

But firstly we need to put this plugin as our depedencies. And how do we do that? We provide a tutorial on how to do that just by below here!

First put this code in your pom.xml file if you're using Maven

<dependency>
    <groupId>com.muhammaddaffaa</groupId>
    <artifactId>NextCollector</artifactId>
    <version>LATEST</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/libs/NextCollectors.jar</systemPath>
</dependency>

If you're using Gradle, put this code in your build.gradle file

dependencies {
    implementation files("${projectDir}/libs/NextCollectors.jar")
}

Secondly after you added NextCollectors to your dependencies, you can now use it in your code!

If you're going to call the API, example on getting the Chunk Collector in certain location:


private double getChunkCollectorMoney(Location location) {
    // Get the collector
    ChunkCollector collector = ChunkCollectorRepository.getCollector(location);
    // If the collector is null, return 0
    if (collector == null) return 0;

    // Return the money
    return collector.getMoney();
}

And that's it! You can now use NextCollectors API in your code!