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

Public Member Functions

 __construct (Server $server, ClientConnection $client, ServerboundPacketId $packetId)
 
- Public Member Functions inherited from Phpcraft\Event\ServerClientEvent
 __construct (Server $server, ClientConnection $client)
 
- Public Member Functions inherited from Phpcraft\Event\ServerEvent
 __construct (Server $server)
 

Public Attributes

 $packetId
 
- Public Attributes inherited from Phpcraft\Event\ServerClientEvent
 $client
 
- Public Attributes inherited from Phpcraft\Event\ServerEvent
 $server
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

Phpcraft\Event\ServerPacketEvent::__construct ( Server  $server,
ClientConnection  $client,
ServerboundPacketId  $packetId 
)

Member Data Documentation

◆ $packetId

ServerboundPacketId Phpcraft\Event\ServerPacketEvent::$packetId

The ID of the packet that the client has sent.