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

Open
john-clardy wants to merge 4 commits into
firstdarkdev:3.0.0/devfrom
john-clardy:3.0.0/dev
Open

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

Conversation

@john-clardy

Copy link
Copy Markdown

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(...).

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.

1 participant