Skip to content

Commit

Permalink
Only Re-apply users rank if perm override is enabled. (#182)
Browse files Browse the repository at this point in the history
Co-authored-by: Bishbash777 <[email protected]>
  • Loading branch information
Bishbash777 and Bishbash777 authored Mar 17, 2021
1 parent 584cc80 commit 531c31d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Essentials/RanksAndPermissionsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ public void UpdateRegisteredPlayersRanks(string newName) {
GetInheritedRanks(rankData, player.SteamID);
}
}
MySession.Static.SetUserPromoteLevel(player.SteamID, ParseMyPromoteLevel(MainRank.KeenLevelRank));
//Only Re-apply users rank if perm override is enabled.
if (EssentialsPlugin.Instance.Config.OverrideVanillaPerms) {
MySession.Static.SetUserPromoteLevel(player.SteamID, ParseMyPromoteLevel(MainRank.KeenLevelRank));
}

string Ranks = ($"{MainRank.RankName},");
foreach (RankData inherited in PlayersInheritedRanksStore[player.SteamID]) {
Ranks += ($"{inherited.RankName},");
Expand Down

0 comments on commit 531c31d

Please sign in to comment.