Add helper command for Player toolshed commands (#4987)

Allows you to invoke players:entity with a username to immediate get that player's attached entity(if any)
This commit is contained in:
nikthechampiongr
2024-03-23 16:27:54 +02:00
committed by GitHub
parent 1f2b38a6d1
commit 0a79382a62

View File

@@ -69,6 +69,12 @@ public sealed class PlayerCommand : ToolshedCommand
{
return sessions.AttachedEntity ?? default;
}
[CommandImplementation("entity")]
public EntityUid GetPlayerEntity([CommandInvocationContext] IInvocationContext ctx, [CommandArgument] string username)
{
return GetPlayerEntity(Immediate(ctx, username));
}
}
public record struct NoSuchPlayerError(string Username) : IConError