Class UserData
Entity client wrapper for the Client that provides functions to access user data.
Inherited Members
Namespace: STREAMSIX.Client
Assembly: cs.temp.dll.dll
Syntax
public class UserData
Constructors
UserData(S6Environment, String, UserManager)
Declaration
public UserData(S6Environment env, string license, UserManager userManager)
Parameters
Type | Name | Description |
---|---|---|
S6Environment | env | |
System.String | license | |
UserManager | userManager |
Properties
Client
Declaration
public EntityClient Client { get; }
Property Value
Type | Description |
---|---|
EntityClient |
Methods
BanPlayers(String, List<BannedUser>)
Ban a list of players for a user.
Declaration
public async Task<bool> BanPlayers(string userID, List<BannedUser> players)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | User that is banning the players |
List<BannedUser> | players | List of users to ban. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | true if the ban was successful. Otherwise, false. |
Exceptions
Type | Condition |
---|---|
BanException | Fail to bann players. |
DeleteUserEntity(String, List<EntityDef>)
Delete user entities.
Declaration
public async Task DeleteUserEntity(string userID, List<EntityDef> entities)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | |
List<EntityDef> | entities | Data is ignored. The other entity members are used to identify an entity to delete. License and SubjectID are automatically filled out. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Exceptions
Type | Condition |
---|---|
DeleteUserEntityException | Fail to delete user entities. |
GetBannedPlayers(String)
Get a Dictionary of banned users.
Declaration
public async Task<List<BannedUser>> GetBannedPlayers(string userID)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | User that banned the players |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<List<BannedUser>> | A list of banned players. |
Exceptions
Type | Condition |
---|---|
BanException | Fail to get banned players list. |
GetUserEntities(String)
Get all entities under a user, including all game entities. These can be either UserRead or UserReadWrite
Declaration
public async Task<List<EntityDef>> GetUserEntities(string userID)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<List<EntityDef>> |
Exceptions
Type | Condition |
---|---|
GetUserEntityException | Fail to get user entities. |
GetUserEntity(String, EntityType, String)
Get a single user entity.
Declaration
public async Task<EntityDef> GetUserEntity(string userID, EntityType entityType, string entityName)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | |
EntityType | entityType | |
System.String | entityName |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<EntityDef> |
Exceptions
Type | Condition |
---|---|
GetUserEntityException | Fail to get user entity. |
UnBanPlayer(String, String)
Lift a player's ban.
Declaration
public async Task<bool> UnBanPlayer(string userID, string playerID)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | User that banned the player |
System.String | playerID | Player's ID to remove ban. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | true if the ban was successfully lifted. Otherwise, false. |
Exceptions
Type | Condition |
---|---|
BanException | Fail to lift player's ban. |
UpsertUserEntity(String, List<EntityDef>)
Update or create user entities.
Declaration
public async Task UpsertUserEntity(string userID, List<EntityDef> entities)
Parameters
Type | Name | Description |
---|---|---|
System.String | userID | |
List<EntityDef> | entities | List of entities to upsert. License and SubjectID are automatically filled out. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Exceptions
Type | Condition |
---|---|
UpsertUserEntityException | Fail to upsert user entities. |