diff --git a/Content.Server/Administration/AdminSystem.cs b/Content.Server/Administration/AdminSystem.cs index c905d5c2ce..b04ced17a0 100644 --- a/Content.Server/Administration/AdminSystem.cs +++ b/Content.Server/Administration/AdminSystem.cs @@ -33,7 +33,7 @@ namespace Content.Server.Administration SubscribeLocalEvent(OnRoleEvent); } - private void UpdatePlayerList(IPlayerSession player) + public void UpdatePlayerList(IPlayerSession player) { _playerList[player.UserId] = GetPlayerInfo(player); diff --git a/Content.Server/Mind/Commands/RenameCommand.cs b/Content.Server/Mind/Commands/RenameCommand.cs index 7ab5712502..2303d35257 100644 --- a/Content.Server/Mind/Commands/RenameCommand.cs +++ b/Content.Server/Mind/Commands/RenameCommand.cs @@ -8,6 +8,7 @@ using Content.Server.PDA; using Content.Shared.Access.Components; using Content.Shared.Administration; using Content.Shared.PDA; +using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.GameObjects; @@ -90,6 +91,13 @@ public class RenameCommand : IConsoleCommand pdaSystem.SetOwner(pdaComponent, name); } } + + // Admin Overlay + if (entSysMan.TryGetEntitySystem(out var adminSystem) + && entMan.TryGetComponent(entityUid, out var actorComp)) + { + adminSystem.UpdatePlayerList(actorComp.PlayerSession); + } } private static bool TryParseUid(string str, IConsoleShell shell,