Include the API with Maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.angeschossen</groupId>
<artifactId>LandsAPI</artifactId>
<version>INSERT VERSION HERE</version>
<scope>provided</scope>
</dependency>
</dependencies>Include the API with Gradle:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly "com.github.angeschossen:LandsAPI:INSERT VERSION HERE"
}Alternatively you can download the jar file from here: https://github.com/Angeschossen/LandsAPI/releases
Please make sure to add softdepend: [Lands] to your plugin.yml.
Example:
private final LandsIntegration landsIntegration;
public IntegrationExample(Plugin yourPlugin) {
// view methods of this class: https://github.com/Angeschossen/LandsAPI/blob/4.8.17/src/main/java/me/angeschossen/lands/api/integration/LandsIntegrator.java
this.landsIntegration = new LandsIntegration(yourPlugin);
}
// just a test
void test(Location location) {
// get a land area from a location
final Area area = landsIntegration.getAreaByLoc(location);
// check is a location claimed
final boolean isClaimed = landsIntegration.isClaimed(location);
}