mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user