Getting The API
You need to add the dependency to your pom.xml
.
<repository>
<id>reposilite-repository-releases</id>
<name>Reposilite Repository</name>
<url>https://repo.athlas.club/releases</url>
</repository>
<dependency>
<groupId>me.gurwi</groupId>
<artifactId>InventoryTrackerAPI</artifactId>
<version>1.0.2</version>
</dependency>
You need to add the dependency to your build.gradle
.
maven {
name "athlasDevRepositoryReleases"
url "https://repo.athlas.club/releases"
}
compileOnly "me.gurwi:InventoryTrackerAPI:1.0.2"
You need to add the dependency to your build.gradle.kts
.
maven {
name = "reposiliteRepositoryReleases"
url = uri("https://repo.athlas.club/releases")
}
compileOnly("me.gurwi:InventoryTrackerAPI:1.0.2")
package me.gurwi.example;
import me.gurwi.inventorytracker.api.InventoryTrackerAPI;
import org.bukkit.plugin.java.JavaPlugin;
public final class InventoryTrackerExample extends JavaPlugin {
private InventoryTrackerAPI inventoryTrackerAPI;
@Override
public void onEnable() {
inventoryTrackerAPI = InventoryTrackerAPI.getAPI();
if (inventoryTrackerAPI == null) {
getLogger().severe("Inventory tracker is not loaded!");
getServer().getPluginManager().disablePlugin(this);
return;
}
}
@Override
public void onDisable() {
}
public InventoryTrackerAPI getInventoryTrackerAPI() {
return inventoryTrackerAPI;
}
}
Last updated