API Hook-up

Easy to understand and use

Ask for the API .jar file from here.

Registering the API in your project

Maven

Replace libs with the name of the directory where the .jar file is stored and replace API.jar with the name of the .jar file.

<dependency>
  <groupId>com.reussy.development.challenges</groupId>
  <artifactId>api</artifactId>
  <version>1.0.0-BETA</version> 
  <scope>system</scope>
  <systemPath>${project.basedir}\libs\Challenges-API.jar</systemPath>
</dependency>

Gradle

Replace libs with the name of the directory where the .jar file is stored and replace API.jar with the name of the .jar file.

implementation fileTree(include: ['Challenges-API.jar'], dir: 'libs')

Obtaining and using the API

To obtain the API class we make use of the service provided by Bukkit to register a class and retrieve it using #getRegistration method.

Retrieving the service

Change challenge wins

Last updated

Was this helpful?