DataPacketDecodeEvent
Extends ServerEvent
Implements Cancellable
Called before a packet is decoded and handled by the network session. Cancelling this event will drop the packet without decoding it, minimizing wasted CPU time.
Methods
__construct()
php
public function __construct(\pocketmine\network\mcpe\NetworkSession $origin, int $packetId, string $packetBuffer)getOrigin()
php
public function getOrigin() : \pocketmine\network\mcpe\NetworkSessiongetPacketBuffer()
php
public function getPacketBuffer() : stringgetPacketId()
php
public function getPacketId() : int