Documentation

QueryBedrock extends Query

Class QueryBedrock

Table of Contents

Properties

$encoding  : string
$host  : string
$info  : array<string, mixed>
$players  : array<string|int, string>
$port  : int
$resolveSRV  : bool
$socket  : resource|null
$timeout  : int

Methods

__construct()  : mixed
__destruct()  : mixed
connect()  : Query
disconnect()  : void
getCountPlayers()  : int
getEncoding()  : string
getHost()  : string
getInfo()  : array<string, mixed>
Returns the obtained host information
getMaxPlayers()  : int
getPlayers()  : array<string|int, string>
Returns a potential list of players
getPort()  : int
getTimeout()  : int
isConnected()  : bool
Returns information about whether the connection was successful, it can also tell if the server is online
isResolveSRV()  : bool
setEncoding()  : void
setTimeout()  : void
Sets the time to get resources
_connect()  : void
encoding()  : array<string|int, mixed>
getChallenge()  : string
Copied from https://github.com/xPaw/PHP-Minecraft-Query/
getStatus()  : void
Copied from https://github.com/xPaw/PHP-Minecraft-Query/
resolveSRV()  : array<string, string|null>
resolveStatus()  : array<string, int|string|null>
writeData()  : string|null
Copied from https://github.com/xPaw/PHP-Minecraft-Query/

Properties

Methods

__construct()

public __construct(string $host[, int $port = 25565 ][, int $timeout = 3 ][, bool $resolveSRV = true ]) : mixed
Parameters
$host : string
$port : int = 25565
$timeout : int = 3
$resolveSRV : bool = true
Tags
throws
InvalidArgumentException

The $timeout must be a positive integer

getEncoding()

public getEncoding() : string
Return values
string

getPlayers()

Returns a potential list of players

public getPlayers() : array<string|int, string>
Tags
inheritDoc
throws
NotConnectedException
Return values
array<string|int, string>

isConnected()

Returns information about whether the connection was successful, it can also tell if the server is online

public isConnected() : bool
Tags
inheritDoc
Return values
bool

setEncoding()

public setEncoding(string $encoding) : void
Parameters
$encoding : string

setTimeout()

Sets the time to get resources

public setTimeout(int $timeout) : void
Parameters
$timeout : int
Tags
inheritDoc
throws
InvalidArgumentException

The timeout must be a positive integer.

_connect()

protected _connect(string $host, int $port) : void
Parameters
$host : string
$port : int
Tags
throws
ConnectionException

Thrown when failed to connect to resource

encoding()

protected encoding(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

getChallenge()

Copied from https://github.com/xPaw/PHP-Minecraft-Query/

protected getChallenge() : string
Tags
throws
ReceiveStatusException
Return values
string

resolveSRV()

protected resolveSRV(string $host) : array<string, string|null>
Parameters
$host : string
Return values
array<string, string|null>

resolveStatus()

protected resolveStatus(string $data) : array<string, int|string|null>
Parameters
$data : string
Return values
array<string, int|string|null>

writeData()

Copied from https://github.com/xPaw/PHP-Minecraft-Query/

protected writeData(int $command[, string $append = "" ]) : string|null
Parameters
$command : int
$append : string = ""
Tags
throws
ReceiveStatusException
Return values
string|null

        
On this page

Search results