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

Public Member Functions

 __construct (ClientConnection $client, ServerConnection $server, ClientboundPacketId $packetId)
 
- Public Member Functions inherited from Phpcraft\Event\ProxyPacketEvent
 __construct (ClientConnection $client, ?ServerConnection $server, PacketId $packetId)
 
- Public Member Functions inherited from Phpcraft\Event\ProxyEvent
 __construct (?ClientConnection $client, ?ServerConnection $server=null)
 

Additional Inherited Members

- Public Attributes inherited from Phpcraft\Event\ProxyPacketEvent
 $packetId
 
- Public Attributes inherited from Phpcraft\Event\ProxyEvent
 $client
 
 $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 proxy when it receives a packet addressed to one of its clients. Cancellable. Cancelling the event prevents the recipient from receiving the packet.

Constructor & Destructor Documentation

◆ __construct()

Phpcraft\Event\ProxyClientPacketEvent::__construct ( ClientConnection  $client,
ServerConnection  $server,
ClientboundPacketId  $packetId 
)
Parameters
ClientConnection$clientThe client connection.
ServerConnection$serverThe server connection.
ClientboundPacketId$packetIdThe ID of the packet the server has sent.