Documentation

MinecraftIntegration extends IntegrationBase

MinecraftIntegration class

Tags
author

Partydragen

version
2.1.0
license

MIT

Table of Contents

Properties

$_icon  : string
$_language  : Language
$_name  : string
$_order  : int|null
$_settings  : string|null
$_data  : IntegrationData
$_db  : DB
$_errors  : array<string|int, mixed>
$_uuid  : string

Methods

__construct()  : mixed
addError()  : void
Add an error to the errors array.
afterRegistrationValidation()  : mixed
Called after registration validation.
allowLinking()  : bool
Should we allow linking with this integration?
beforeRegistrationValidation()  : mixed
Called before registration validation.
data()  : IntegrationData
Get the integration data.
getErrors()  : array<string|int, mixed>
Get any errors from the functions given by this integration.
getIcon()  : string
Get the icon of this integration.
getLanguage()  : Language
Get language.
getName()  : string
Get the name of this integration.
getOnlineModeUuid()  : array<string|int, mixed>
Query mojang api to get online-mode UUID.
getOrder()  : int
Get the display order of this integration.
getSettings()  : string
Get the settings path for this integration.
getUuidByUsername()  : array<string|int, mixed>
Get minecraft UUID by username
isEnabled()  : bool
Get if this integration is enabled.
onLinkRequest()  : mixed
Called when user wants to link their account from user connections page, Does not need to be verified.
onRegistrationPageLoad()  : mixed
Called when register page being loaded.
onSuccessfulVerification()  : mixed
Called when the user have successfully validated the ownership of the account.
onUnlinkRequest()  : mixed
Called when user wants to unlink their integration user from connections page.
onVerifyRequest()  : mixed
Called when user wants to continue to verify their integration user from connections page.
successfulRegistration()  : mixed
Called when user is successfully registered.
syncIntegrationUser()  : bool
Called when user integration is requested to be synced.
validateIdentifier()  : bool
Validate identifier when it being linked or updated.
validateUsername()  : bool
Validate username when it being linked or updated.
flashVerifyCommand()  : void

Properties

Methods

addError()

Add an error to the errors array.

public addError(string $error) : void
Parameters
$error : string

The error message

afterRegistrationValidation()

Called after registration validation.

public afterRegistrationValidation() : mixed

allowLinking()

Should we allow linking with this integration?

public allowLinking() : bool
Return values
bool

Whether to allow linking with this integration

getErrors()

Get any errors from the functions given by this integration.

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>

Any errors

getIcon()

Get the icon of this integration.

public getIcon() : string
Return values
string

Icon of integration.

getName()

Get the name of this integration.

public getName() : string
Return values
string

Name of integration.

getOnlineModeUuid()

Query mojang api to get online-mode UUID.

public getOnlineModeUuid(string $username) : array<string|int, mixed>
Parameters
$username : string
Return values
array<string|int, mixed>

getOrder()

Get the display order of this integration.

public getOrder() : int
Return values
int

Display order of integration.

getSettings()

Get the settings path for this integration.

public getSettings() : string
Return values
string

Integration settings path.

getUuidByUsername()

Get minecraft UUID by username

public getUuidByUsername(string $username) : array<string|int, mixed>
Parameters
$username : string
Return values
array<string|int, mixed>

isEnabled()

Get if this integration is enabled.

public isEnabled() : bool
Return values
bool

Check if integration is enabled

onLinkRequest()

Called when user wants to link their account from user connections page, Does not need to be verified.

public onLinkRequest(User $user) : mixed
Parameters
$user : User

onRegistrationPageLoad()

Called when register page being loaded.

public onRegistrationPageLoad(Fields $fields) : mixed
Parameters
$fields : Fields

onUnlinkRequest()

Called when user wants to unlink their integration user from connections page.

public onUnlinkRequest(User $user) : mixed
Parameters
$user : User

onVerifyRequest()

Called when user wants to continue to verify their integration user from connections page.

public onVerifyRequest(User $user) : mixed
Parameters
$user : User

successfulRegistration()

Called when user is successfully registered.

public successfulRegistration(User $user) : mixed
Parameters
$user : User

validateIdentifier()

Validate identifier when it being linked or updated.

public validateIdentifier(string $identifier[, int $integration_user_id = 0 ]) : bool
Parameters
$identifier : string

The identifier value to validate.

$integration_user_id : int = 0

The integration user id to ignore during duplicate check.

Return values
bool

Whether this validation passed or not.

validateUsername()

Validate username when it being linked or updated.

public validateUsername(string $username[, int $integration_user_id = 0 ]) : bool
Parameters
$username : string

The username value to validate.

$integration_user_id : int = 0

The integration user id to ignore during duplicate check.

Return values
bool

Whether this validation passed or not.

flashVerifyCommand()

private flashVerifyCommand(string $verification_code) : void
Parameters
$verification_code : string

        
On this page

Search results