BedrioxDOCUMENTATION
API CLASS

PlayerConnection

A live, typed packet path to one player's current Bedrock connection.

Bedriox\Api\Player\PlayerConnection
classBedriox\Api\Player

Public methods

__construct(Closure $connected, Closure $sendPacket, ?Closure $kick = null, ?Closure $swingArm = null)

Typed public method.

static disconnected(): self

Typed public method.

isConnected(): bool

Typed public method.

sendPacket(Bedriox\Protocol\Packet\Packet $packet, bool $immediate = false): bool

Typed public method.

kick(string $reason = '', ?string $quitMessage = null, ?string $disconnectScreenMessage = null): bool

Typed public method.

swingArm(): bool

Typed public method.

View exact source ↗