ClientboundPacket
extends
Packet
in
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 —decode()
public
decode(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —encode()
public
encode(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —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
Return values
bool —true if the packet was handled successfully, false if not.
pid()
public
pid() : int