RankManager

Functions

Link copied to clipboard

Retrieves the Rank object matching the specified rank name.

Link copied to clipboard
fun getRankOfUser(uuid: UUID): Rank

Returns the rank of a user based on their UUID.

Link copied to clipboard
fun initScoreBoard(scoreboard: Scoreboard)
Link copied to clipboard

Loads ranks from the luckPerms.groupManager.loadedGroups list and populates the ranks list with Rank objects. Each Rank object contains information about the rank's name, color, bitsPerMinute, weight, parent, and discordRoleID. Once loaded, the ranks list is sorted by weight in ascending order. This method also logs the loaded ranks and their count.

Link copied to clipboard
fun updateDiscordRank(discordID: String)

Updates the Discord rank of a user based on their Discord ID.

Link copied to clipboard
fun updateRank(rank: Rank, uuid: UUID)

Updates the rank of a user by setting their primary group and updating their role in Discord. This method modifies the user's rank in the LuckPerms plugin and updates their role in Discord if they are linked.

Link copied to clipboard
fun updateScoreBoardForPlayer(player: Player)