Phpcraft
Public Member Functions | Public Attributes | List of all members
Phpcraft\Event\ClientPacketEvent Class Reference
Inheritance diagram for Phpcraft\Event\ClientPacketEvent:
Inheritance graph
[legend]
Collaboration diagram for Phpcraft\Event\ClientPacketEvent:
Collaboration graph
[legend]

Public Member Functions

 __construct (ServerConnection $server, ClientboundPacketId $packetId)
 
- Public Member Functions inherited from Phpcraft\Event\ClientEvent
 __construct (ServerConnection $server)
 

Public Attributes

 $packetId
 
- Public Attributes inherited from Phpcraft\Event\ClientEvent
 $server
 

Detailed Description

The event emitted by the client when the server has sent a packet. Cancellable. Cancelling the event tells the client to ignore the packet.

Constructor & Destructor Documentation

◆ __construct()

Phpcraft\Event\ClientPacketEvent::__construct ( ServerConnection  $server,
ClientboundPacketId  $packetId 
)

Member Data Documentation

◆ $packetId

ClientboundPacketId Phpcraft\Event\ClientPacketEvent::$packetId

The ID of the packet that the server has sent.