RankForge API Dependency Setup – Maven, Gradle & plugin.yml
To integrate with the API, your plugin compiles against the RankForge JAR without bundling it (provided / compileOnly scope), and declares the dependency in plugin.yml.
1. Obtain the Plugin Artifact
Section titled “1. Obtain the Plugin Artifact”- Download
RankForge-1.0.0.jarfrom the Modrinth Release Page. - Save the JAR into your plugin project’s
libs/directory.
Install the downloaded JAR into your local .m2 repository:
mvn install:install-file \ -Dfile=RankForge-1.0.0.jar \ -DgroupId=xyz.noxlydev \ -DartifactId=RankForge \ -Dversion=1.0.0 \ -Dpackaging=jar2. Declare the Build Dependency
Section titled “2. Declare the Build Dependency”<dependency> <groupId>xyz.noxlydev</groupId> <artifactId>RankForge</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${project.basedir}/libs/RankForge-1.0.0.jar</systemPath></dependency>dependencies { compileOnly(files("libs/RankForge-1.0.0.jar"))}dependencies { compileOnly files('libs/RankForge-1.0.0.jar')}3. Configure plugin.yml
Section titled “3. Configure plugin.yml”# Hard dependency (plugin requires RankForge to boot)depend: - RankForge
# OR Soft dependency (optional feature integration)softdepend: - RankForge4. Verify API Availability at Runtime
Section titled “4. Verify API Availability at Runtime”import xyz.noxlydev.rankforge.api.RankForgeAPI;
if (RankForgeAPI.isAvailable()) { int points = RankForgeAPI.get().getPoints(player);}