Skip to main content
Version: 4.0.0

Using the API

This page quickly explains how to obtain the API instance and start using it in your project.

Add the API artifact​

Firstly, you need to add the API artifact to your project. You can do this by adding the following Maven or Gradle dependencies:

Maven​

<!-- InfernalSuite RELEASE -->
<repositories>
<repository>
<id>is-releases</id>
<url>https://repo.infernalsuite.com/repository/maven-releases/</url>
</repository>
</repositories>

<!-- InfernalSuite SNAPSHOT -->
<repositories>
<repository>
<id>is-snapshots</id>
<url>https://repo.infernalsuite.com/repository/maven-snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.infernalsuite.asp</groupId>
<artifactId>api</artifactId>
<version>4.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

Gradle​

repositories {
maven { url = 'https://repo.infernalsuite.com/repository/maven-snapshots/' }
}

dependencies {
compileOnly 'com.infernalsuite.asp:api:4.0.0-SNAPSHOT'
}

Getting the API instance​

Now that you've added the API artifact to your project, you can get the API instance by calling AdvancedSlimePaperAPI.instance().

AdvancedSlimePaperAPI asp = AdvancedSlimePaperAPI.instance();

// Do stuff

Javadocs​

You can find the Javadocs for the API here. Most of the methods are documented, or the method names are self-explanatory.

Examples​

See the other articles, or check the source code of the SlimeWorldPlugin which uses the API.