PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
__construct (private NetworkSession $origin, private int $packetId, private string $packetBuffer) | |
call () | |
getEventName () | |
getOrigin () | |
getPacketBuffer () | |
getPacketId () | |
isCancelled () | |
Static Public Member Functions | |
static | hasHandlers () |
Protected Attributes | |
string | $eventName = null |
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.
Definition at line 34 of file DataPacketDecodeEvent.php.
pocketmine\event\server\DataPacketDecodeEvent::__construct | ( | private NetworkSession | $origin, |
private int | $packetId, | ||
private string | $packetBuffer ) |
Definition at line 37 of file DataPacketDecodeEvent.php.
|
inherited |
pocketmine\event\server\DataPacketDecodeEvent::getOrigin | ( | ) |
Definition at line 43 of file DataPacketDecodeEvent.php.
pocketmine\event\server\DataPacketDecodeEvent::getPacketBuffer | ( | ) |
Definition at line 51 of file DataPacketDecodeEvent.php.
pocketmine\event\server\DataPacketDecodeEvent::getPacketId | ( | ) |
Definition at line 47 of file DataPacketDecodeEvent.php.
|
staticinherited |
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
|
protectedinherited |