Skip to content

Premium API

Joris Guffens edited this page Nov 18, 2024 · 9 revisions

Dependencies

Gradle

repositories {
    maven { url 'https://repo.jorisg.com/releases' }
}

dependencies {
    compileOnly 'com.gufli.kingdomcraft.premium:api:7.1.2'
}

Maven

<repositories>
    <repository>
        <id>JorisG</id>
        <url>https://repo.jorisg.com/releases</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.gufli.kingdomcraft.premium</groupId>
    <artifactId>api</artifactId>
    <version>7.1.2</version>
    <scope>provided</scope>
</dependency>

Javadocs

Read the javadocs for full api coverage.

Sample usage

KingdomCraftPremium kdcp = KingdomCraftPremiumProvider.get();

PowerApi powerApi = kdcp.powerApi();

// check if this module is enabled
if ( powerApi != null ) { 
    float power = powerApi.getPower(user);
}
Clone this wiki locally