Less than 1 minute
How to add GD API as dependency
Groovy(Gradle)
compileOnly group: 'com.griefdefender', name: 'api', version: '2.1.0-SNAPSHOT'
maven
{
name = 'griefdefender'
url = 'https://repo.glaremasters.me/repository/bloodshot'
}
Maven
<dependency>
<groupId>com.griefdefender</groupId>
<artifactId>api</artifactId>
<version>2.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<repository>
<id>griefdefender</id>
<url>https://repo.glaremasters.me/repository/bloodshot</url>
</repository>
Note: Latest API snapshots can be found on maven repo
Code Examples
Check if location is part of a user claim
final Claim claim = GriefDefender.getCore().getClaimAt(location);
if (claim != null && !claim.isWilderness()) {
// do your logic
}