VGRAVES API
Dependency Management
Maven, Gradle, plugin.yml, and runtime access setup for consuming the VGraves API from another plugin.
plugin.yml
depend:
- VGraves
softdepend:
- VGravesMaven
<repositories>
<repository>
<id>vzone-repo</id>
<url>https://repo.vzone.hu/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>hu.vzone</groupId>
<artifactId>VGraves</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>Gradle
repositories {
maven("https://repo.vzone.hu/releases")
}
dependencies {
compileOnly("hu.vzone:VGraves:1.0.0")
}Runtime Access
RegisteredServiceProvider<VGravesApi> provider =
Bukkit.getServicesManager().getRegistration(VGravesApi.class);
if (provider != null) {
VGravesApi api = provider.getProvider();
api.getGraves(player.getUniqueId());
}VGraves.getInstance().getApi() is also available when your plugin directly depends on VGraves and the plugin is already loaded.