Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions EXILED/Exiled.API/Features/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1915,25 +1915,19 @@ public bool TryGetItem(ushort serial, out Item item)
}

/// <summary>
/// Sets the player's rank.
/// Receives an existing rank(group) or, if it doesn't exist, creates a new one and assigns it to this player.
/// </summary>
/// <param name="name">The rank name to be set.</param>
/// <param name="group">The group to be set.</param>
public void SetRank(string name, UserGroup group)
public void SetGroup(string name, UserGroup group)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed breaking change

{
if (ServerStatic.PermissionsHandler.Groups.TryGetValue(name, out UserGroup userGroup))
{
userGroup.BadgeColor = group.BadgeColor;
userGroup.BadgeText = name;
userGroup.HiddenByDefault = !group.Cover;
userGroup.Cover = group.Cover;

ReferenceHub.serverRoles.SetGroup(userGroup, false, false);
}
else
{
ServerStatic.PermissionsHandler.Groups.Add(name, group);

ReferenceHub.serverRoles.SetGroup(group, false, false);
}

Expand Down
Loading