Documentation

AddPlayerPacket extends DataPacket
in package
implements ClientboundPacket

Interfaces, Classes, Traits and Enums

ClientboundPacket

Table of Contents

NETWORK_ID  = \pocketmine\network\mcpe\protocol\ProtocolInfo::ADD_PLAYER_PACKET
PID_MASK  = 0x3ff
RECIPIENT_SUBCLIENT_ID_SHIFT  = 12
SENDER_SUBCLIENT_ID_SHIFT  = 10
SUBCLIENT_ID_MASK  = 0x3
$actorRuntimeId  : int
$actorUniqueId  : int
$adventureSettingsPacket  : AdventureSettingsPacket
$buildPlatform  : int
$deviceId  : string
$headYaw  : float
$item  : ItemStackWrapper
$links  : array<string|int, mixed>
$metadata  : array<string|int, mixed>
$motion  : Vector3|null
$pitch  : float
$platformChatId  : string
$position  : Vector3
$recipientSubId  : int
$senderSubId  : int
$username  : string
$uuid  : UuidInterface
$yaw  : float
__get()  : mixed
__set()  : void
canBeSentBeforeLogin()  : bool
create()  : self
decode()  : void
encode()  : void
getName()  : string
handle()  : bool
pid()  : int
decodeHeader()  : void
decodePayload()  : void
Decodes the packet body, without the packet ID or other generic header fields.
encodeHeader()  : void
encodePayload()  : void
Encodes the packet body, without the packet ID or other generic header fields.

Constants

NETWORK_ID

public mixed NETWORK_ID = \pocketmine\network\mcpe\protocol\ProtocolInfo::ADD_PLAYER_PACKET

RECIPIENT_SUBCLIENT_ID_SHIFT

private mixed RECIPIENT_SUBCLIENT_ID_SHIFT = 12

SENDER_SUBCLIENT_ID_SHIFT

private mixed SENDER_SUBCLIENT_ID_SHIFT = 10

SUBCLIENT_ID_MASK

private mixed SUBCLIENT_ID_MASK = 0x3

Properties

$buildPlatform

public int $buildPlatform = \pocketmine\network\mcpe\protocol\types\DeviceOS::UNKNOWN

$metadata

public array<string|int, mixed> $metadata = []
Tags
phpstan-var

array<int, MetadataProperty>

Methods

__get()

public __get(string $name) : mixed
Parameters
$name : string
Return values
mixed

__set()

public __set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Return values
void

canBeSentBeforeLogin()

public canBeSentBeforeLogin() : bool
Return values
bool

create()

public static create(UuidInterface $uuid, string $username, int $actorUniqueId, int $actorRuntimeId, string $platformChatId, Vector3 $position, Vector3|null $motion, float $pitch, float $yaw, float $headYaw, ItemStackWrapper $item, array<string|int, MetadataProperty$metadata, AdventureSettingsPacket $adventureSettingsPacket, array<string|int, EntityLink$links, string $deviceId, int $buildPlatform) : self
Parameters
$uuid : UuidInterface
$username : string
$actorUniqueId : int
$actorRuntimeId : int
$platformChatId : string
$position : Vector3
$motion : Vector3|null
$pitch : float
$yaw : float
$headYaw : float
$item : ItemStackWrapper
$metadata : array<string|int, MetadataProperty>
$adventureSettingsPacket : AdventureSettingsPacket
$links : array<string|int, EntityLink>
$deviceId : string
$buildPlatform : int
Tags
generate-create-func
phpstan-param

array<int, MetadataProperty> $metadata

Return values
self

getName()

public getName() : string
Return values
string

Search results