Interface IPlayerLocator
Utilities for finding user IDs that extend to more than the server database.
Namespace: Content.Server.Administration
Assembly: Content.Server.dll
Syntax
public interface IPlayerLocator
Remarks
Methods in this class will check connected clients, server database AND the authentication server for lookups, in that order.
Methods
| Improve this Doc View SourceLookupIdAsync(NetUserId, CancellationToken)
Look up a user by Robust.Shared.Network.NetUserId globally.
Declaration
Task<LocatedPlayerData?> LookupIdAsync(NetUserId userId, CancellationToken cancel = null)
Parameters
Type | Name | Description |
---|---|---|
Robust.Shared.Network.NetUserId | userId | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<System.Nullable<LocatedPlayerData>> | Null if the player does not exist. |
LookupIdByNameAsync(String, CancellationToken)
Look up a user ID by name globally.
Declaration
Task<LocatedPlayerData?> LookupIdByNameAsync(string playerName, CancellationToken cancel = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | playerName | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<System.Nullable<LocatedPlayerData>> | Null if the player does not exist. |
LookupIdByNameOrIdAsync(String, CancellationToken)
If passed a GUID, looks up the ID and tries to find HWId for it. If passed a player name, returns LookupIdByNameAsync(String, CancellationToken).
Declaration
Task<LocatedPlayerData?> LookupIdByNameOrIdAsync(string playerName, CancellationToken cancel = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | playerName | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<System.Nullable<LocatedPlayerData>> |