C# Class Sharpcraft.User

Represents the currently logged in minecraft user.
Afficher le fichier Open project: SijmenSchoon/Sharpcraft Class Usage Examples

Méthodes publiques

Méthode Description
GetName ( bool pretty = false ) : string

Gets the name of the user.

SetName ( string name ) : void

Set the name of the user.

Note that this is entirely client-side, this does not update the actual username on the minecraft servers.

SetSessionID ( string id ) : void

Set this user's session ID.

Private Methods

Méthode Description
User ( string name = null, string sessionId = null )

Initialize a new instance of the User class.

All of the parameters are optional and can be set later.

Method Details

GetName() public méthode

Gets the name of the user.
public GetName ( bool pretty = false ) : string
pretty bool true to capitalize the first letter and make the rest lowercase, false for unmodified.
Résultat string

SetName() public méthode

Set the name of the user.
Note that this is entirely client-side, this does not update the actual username on the minecraft servers.
public SetName ( string name ) : void
name string The new name to set.
Résultat void

SetSessionID() public méthode

Set this user's session ID.
public SetSessionID ( string id ) : void
id string The session ID to set.
Résultat void