Documentation

ClientboundPacket extends Packet

Table of Contents

canBeSentBeforeLogin()  : bool
decode()  : void
encode()  : void
getName()  : string
handle()  : bool
Performs handling for this packet. Usually you'll want an appropriately named method in the session handler for this.
pid()  : int

Methods

canBeSentBeforeLogin()

public canBeSentBeforeLogin() : bool
Return values
bool

getName()

public getName() : string
Return values
string

handle()

Performs handling for this packet. Usually you'll want an appropriately named method in the session handler for this.

public handle(PacketHandlerInterface $handler) : bool

This method returns a bool to indicate whether the packet was handled or not. If the packet was unhandled, a debug message will be logged with a hexdump of the packet.

Typically this method returns the return value of the handler in the supplied PacketHandler. See other packets for examples how to implement this.

Parameters
$handler : PacketHandlerInterface
Tags
throws
PacketDecodeException

if broken data was found in the packet

Return values
bool

true if the packet was handled successfully, false if not.

pid()

public pid() : int
Return values
int

Search results