From ef3cc433e245648c914995c0f2b7ed955e9e21ad Mon Sep 17 00:00:00 2001 From: VALERA771 Date: Sat, 13 Jul 2024 21:41:20 +0300 Subject: [PATCH] init --- Exiled.API/Features/Player.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Exiled.API/Features/Player.cs b/Exiled.API/Features/Player.cs index e49a74ad67..a00f1ba339 100644 --- a/Exiled.API/Features/Player.cs +++ b/Exiled.API/Features/Player.cs @@ -668,9 +668,19 @@ public PlayerPermissions RemoteAdminPermissions public Role Role { get => role ??= Role.Create(RoleManager.CurrentRole); - internal set => role = value; + internal set + { + PreviousRole = role; + role = value; + } } + /// + /// Gets the previous player's role. + /// + [EProperty(readOnly: true, category: ROLES_CATEGORY)] + public Role PreviousRole { get; private set; } + /// /// Gets or sets the player's SCP preferences. ///