Files
OldThink/Content.Server/Administration/Commands/OpenPermissionsCommand.cs

33 lines
993 B
C#
Raw Normal View History

2021-06-09 22:19:39 +02:00
using Content.Server.Administration.UI;
using Content.Server.EUI;
2020-11-10 16:50:28 +01:00
using Content.Shared.Administration;
using Robust.Server.Player;
using Robust.Shared.Console;
2020-11-10 16:50:28 +01:00
using Robust.Shared.IoC;
namespace Content.Server.Administration.Commands
{
[AdminCommand(AdminFlags.Permissions)]
public sealed class OpenPermissionsCommand : IConsoleCommand
2020-11-10 16:50:28 +01:00
{
public string Command => "permissions";
public string Description => "Opens the admin permissions panel.";
public string Help => "Usage: permissions";
public void Execute(IConsoleShell shell, string argStr, string[] args)
2020-11-10 16:50:28 +01:00
{
var player = shell.Player as IPlayerSession;
2020-11-10 16:50:28 +01:00
if (player == null)
{
shell.WriteLine("This does not work from the server console.");
2020-11-10 16:50:28 +01:00
return;
}
var eui = IoCManager.Resolve<EuiManager>();
var ui = new PermissionsEui();
eui.OpenEui(ui, player);
}
}
}