Login and Sessions

To connect to online-mode server, you should obtain player's session data. The game session data contains player's username, UUID, and accessToken.

There are some ways to obtain game session:

After obtaining a session data, you should set the MLaunchOption.Session property to an MSession instance. Launch Options

MSession API Refernces

Constructors

public MSession()

Creates an empty session.

public MSession(string username, string accesstoken, string uuid)

Creates an MSession with the specified Username, AccessToken, and UUID properties.

Properties

Username

Type: string

UUID

Type: string

AccessToken

Type: string

ClientToken

Type: string

Methods

public bool CheckIsValid()

Return true if Username, AccessToken, UUID is not null or empty.

public static MSession GetOfflineSession(string username)

Creates a new MSession and returns it. Username=username, AccessToken="access_token", UUID="user_uuid"

Last updated