RankForge API Reference – IRankForgeAPI, Tier & PlayerData
Accessing the API
Section titled “Accessing the API”import xyz.noxlydev.rankforge.api.IRankForgeAPI;import xyz.noxlydev.rankforge.api.RankForgeAPI;
IRankForgeAPI api = RankForgeAPI.get();| Method | Description |
|---|---|
RankForgeAPI.isAvailable() |
true if RankForge is loaded and the API is ready. |
RankForgeAPI.get() |
Returns the singleton API instance or throws IllegalStateException. |
IRankForgeAPI Methods
Section titled “IRankForgeAPI Methods”Points Operations
Section titled “Points Operations”| Method | Returns | Description |
|---|---|---|
getPoints(UUID) / getPoints(OfflinePlayer) |
int |
Current points. Returns 0 if player has no records. |
setPoints(UUID, int) / (OfflinePlayer, int) |
void |
Updates score. Fires PlayerPointsChangeEvent, and PlayerTierUpEvent/PlayerTierDownEvent upon tier change. |
addPoints(UUID, int) / (OfflinePlayer, int) |
void |
Increments score (getPoints + amount). |
removePoints(UUID, int) / (OfflinePlayer, int) |
void |
Deducts score (getPoints - amount). |
Tier Operations
Section titled “Tier Operations”| Method | Returns | Description |
|---|---|---|
getTier(UUID) / getTier(OfflinePlayer) |
Tier or null |
Player’s current tier; null if Unranked. |
getTierByPoints(int) |
Tier or null |
Calculates tier for a given score. |
getNextTier(UUID) / getNextTier(OfflinePlayer) |
Tier or null |
Next tier above current; null if max tier. |
getRegisteredTiers() |
List<Tier> |
Unmodifiable list of tiers sorted descending by score threshold. |
Combat Statistics
Section titled “Combat Statistics”| Method | Returns | Description |
|---|---|---|
getKills(UUID) |
int |
Total kills (0 if absent). |
getDeaths(UUID) |
int |
Total deaths (0 if absent). |
getKD(UUID) |
double |
Kill/Death ratio. Equals kills if deaths = 0. |
getDailyKills(UUID) |
int |
Kills counted today. |
Leaderboard & Player Data
Section titled “Leaderboard & Player Data”| Method | Returns | Description |
|---|---|---|
getTopPlayers(int limit) |
List<PlayerData> |
Top players sorted by points descending. |
getPlayerData(UUID) |
PlayerData or null |
Direct player data object. |
