For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-net/classes/PacketSendBeforeEvent.md.

Class: PacketSendBeforeEvent experimental

event network

Beta

在服务器向客户端发送网络数据包时触发的事件。如果取消,服务器将不会向接收客户端发送该网络数据包。

Sent as the server sends a network packet to clients. If cancelled, the server will not send the network packet to the receiving clients.

Properties

cancel

cancel: boolean

Beta


packetId

readonly packetId: PacketId

Beta

Remarks

网络数据包的类型。

The type of network packet.


recipients

readonly recipients: any[]

Beta

Remarks

该网络数据包将发送到的目标客户端。

Which clients the network packet is being sent to.

同领域相关