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

Public Member Functions

 __construct (ClientConnection $client, ?ServerConnection $server, ServerboundPacketId $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 one of its clients sends a packet to their server. Cancellable. Cancelling the event prevents the recipient from receiving the packet.

Constructor & Destructor Documentation

◆ __construct()

Phpcraft\Event\ProxyServerPacketEvent::__construct ( ClientConnection  $client,
?ServerConnection  $server,
ServerboundPacketId  $packetId 
)
Parameters
ClientConnection$clientThe client connection.
ServerConnection | null$serverThe server connection.
ServerboundPacketId$packetIdThe ID of the packet the client has sent.