Sent as the server receives a network packet from a client. If cancelled, the server will not parse the network packet and will silently ignore it.
export class PacketReceivedBeforeEvent { private constructor(); cancel: boolean; readonly packetId: PacketId; readonly packetSize: number; readonly sender?: minecraftserver.Player;} Copy
export class PacketReceivedBeforeEvent { private constructor(); cancel: boolean; readonly packetId: PacketId; readonly packetSize: number; readonly sender?: minecraftserver.Player;}
Private
Readonly
The type of network packet.
This property can't be read in early-execution mode.
The size of the network packet in bytes.
Optional
Which client sent the network packet to the game server.
Sent as the server receives a network packet from a client. If cancelled, the server will not parse the network packet and will silently ignore it.
Source