|
Phpcraft
|
Public Member Functions | |
| __construct (string $username) | |
| loginUsingProfiles () | |
| isOnline () | |
Static Public Member Functions | |
| static | cliLogin () |
| static | online (string $name, string $password) |
| static | getAccountIdFromProfileName (string $profile_name) |
| static | validateUsername (string $username) |
Public Attributes | |
| $username | |
| $profileId = null | |
| $accessToken = null | |
Static Public Attributes | |
| static | $allowed_username_characters = [] |
A Mojang or Minecraft account.
| Phpcraft\Account::__construct | ( | string | $username | ) |
Contructs an Account for "offline mode" usage. For online usage, use Account::online or Account::cliLogin. Okay, I lied, if you call Account::loginUsingProfiles you might be able to convert such an instance into one for "online mode" usage.
| string | $username | The in-game name. |
|
static |
|
static |
| string | $profile_name |
| Phpcraft\Account::isOnline | ( | ) |
Returns whether this account can be used to join servers in online mode.
| Phpcraft\Account::loginUsingProfiles | ( | ) |
Attempts to turns an "offline mode" instance into an "online mode" instance using .minecraft/launcher_profiles.json.
|
static |
Creates a logged-in Account instance for "online mode" usage.
| string | $name | The Mojang account email address or in-game name if unmigrated. |
| string | $password | The account's password. |
|
static |
Returns true if the given username is valid.
| string | $username |
| string null Phpcraft\Account::$accessToken = null |
The access token for the account or null if offline.
|
static |
| string null Phpcraft\Account::$profileId = null |
The selected profile ID or null if offline.
| string Phpcraft\Account::$username |
The in-game name.
1.8.17