Class UserData

Entity client wrapper for the Client that provides functions to access user data.

Inheritance

System.Object
UserData

Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
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

TypeNameDescription
S6Environmentenv
System.Stringlicense
UserManageruserManager

Properties

Client

Declaration

public EntityClient Client { get; }

Property Value

TypeDescription
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

TypeNameDescription
System.StringuserID

User that is banning the players

List<BannedUser>players

List of users to ban.

Returns

TypeDescription
System.Threading.Tasks.Task<System.Boolean>

true if the ban was successful. Otherwise, false.

Exceptions

TypeCondition
BanException

Fail to bann players.

DeleteUserEntity(String, List<EntityDef>)

Delete user entities.

Declaration

public async Task DeleteUserEntity(string userID, List<EntityDef> entities)

Parameters

TypeNameDescription
System.StringuserID
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

TypeDescription
System.Threading.Tasks.Task

Exceptions

TypeCondition
DeleteUserEntityException

Fail to delete user entities.

GetBannedPlayers(String)

Get a Dictionary of banned users.

Declaration

public async Task<List<BannedUser>> GetBannedPlayers(string userID)

Parameters

TypeNameDescription
System.StringuserID

User that banned the players

Returns

TypeDescription
System.Threading.Tasks.Task<List<BannedUser>>

A list of banned players.

Exceptions

TypeCondition
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

TypeNameDescription
System.StringuserID

Returns

TypeDescription
System.Threading.Tasks.Task<List<EntityDef>>

Exceptions

TypeCondition
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

TypeNameDescription
System.StringuserID
EntityTypeentityType
System.StringentityName

Returns

TypeDescription
System.Threading.Tasks.Task<EntityDef>

Exceptions

TypeCondition
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

TypeNameDescription
System.StringuserID

User that banned the player

System.StringplayerID

Player's ID to remove ban.

Returns

TypeDescription
System.Threading.Tasks.Task<System.Boolean>

true if the ban was successfully lifted. Otherwise, false.

Exceptions

TypeCondition
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

TypeNameDescription
System.StringuserID
List<EntityDef>entities

List of entities to upsert. License and SubjectID are automatically filled out.

Returns

TypeDescription
System.Threading.Tasks.Task

Exceptions

TypeCondition
UpsertUserEntityException

Fail to upsert user entities.