Skip to content

DataPacketDecodeEvent ​

class · pocketmine\event\server\DataPacketDecodeEvent · source

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\NetworkSession

getPacketBuffer() ​

php
public function getPacketBuffer() : string

getPacketId() ​

php
public function getPacketId() : int

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.