Skip to content

Add active FTB Ranks lookup for online players. Fixes bug in SDLink where conditon ranks in FTB Teams do not work. - #36

Merged
hypherionmc merged 5 commits into
firstdarkdev:3.0.0/devfrom
john-clardy:3.0.0/dev
Jul 29, 2026
Merged

Add active FTB Ranks lookup for online players. Fixes bug in SDLink where conditon ranks in FTB Teams do not work.#36
hypherionmc merged 5 commits into
firstdarkdev:3.0.0/devfrom
john-clardy:3.0.0/dev

Conversation

@john-clardy

Copy link
Copy Markdown
Contributor

This PR adds support for querying a player's active FTB Ranks, including ranks granted by conditions.

Currently, getPlayerRanks(CraterGameProfile) uses RankManager.getAddedRanks(...), which only returns explicitly assigned ranks. This means integrations cannot detect ranks granted by FTB Ranks conditions.

Changes
Added getPlayerRanks(CraterPlayer) to the FTB Ranks compatibility API.
Implemented the new method using RankManager.getRanks(ServerPlayer) to return all active/effective ranks.
Added hasRank(CraterPlayer, String) for checking active ranks.
Preserved the existing CraterGameProfile methods for backward compatibility and for integrations that work with explicitly assigned ranks.

Tested
Verified that getPlayerRanks(CraterPlayer) returns condition-based ranks that are not present in getAddedRanks(...).

Comment thread src/main/java/com/hypherionmc/craterlib/impl/compat/ftb/FTBRanksImpl.java Outdated
Uncommented based on PR change request for compatability
@hypherionmc
hypherionmc merged commit 8bee455 into firstdarkdev:3.0.0/dev Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants