Goes in-game now
This commit is contained in:
@@ -21,15 +21,13 @@ namespace Content.Server.Actions.Commands
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
if (player == null) return;
|
||||
var attachedEntity = player.AttachedEntity;
|
||||
if (player?.AttachedEntity is not {} attachedEntity) return;
|
||||
if (args.Length > 2)
|
||||
{
|
||||
var target = args[2];
|
||||
if (!CommandUtils.TryGetAttachedEntityByUsernameOrId(shell, target, player, out attachedEntity)) return;
|
||||
}
|
||||
|
||||
if (attachedEntity == default) return;
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(attachedEntity, out ServerActionsComponent? actionsComponent))
|
||||
{
|
||||
shell.WriteError("user has no actions component");
|
||||
|
||||
Reference in New Issue
Block a user