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
 
- Public Attributes inherited from Phpcraft\Event\Event
const PRIORITY_HIGHEST = 2
 
const PRIORITY_HIGH = 1
 
const PRIORITY_NORMAL = 0
 
const PRIORITY_LOW = -1
 
const PRIORITY_LOWEST = -2
 
 $cancelled = false
 

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 
)
Parameters
ServerConnection$serverThe client's server connection.
ClientboundPacketId$packetIdThe ID of the packet that the server has sent.

Member Data Documentation

◆ $packetId

ClientboundPacketId Phpcraft\Event\ClientPacketEvent::$packetId

The ID of the packet that the server has sent.