> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/api/functions/spoofmanager.onpacketreceive.md).

# spoofManager.onPacketReceive

> **onPacketReceive**(`f`): `void`

Register the callback for inbound packets.

You should return a valid SpoofAction which can be:

* PROCESS: Does nothing lets the packet continue just like normal.
* CANCEL: Cancels the packet entirely.
* DELAY: Starts delaying the packet until you decide to release it.

### Parameters

#### f

(`packet`) => [`SpoofAction`](/api/enum_types/spoofaction.md)

### Returns

`void`

### Example

```ts
spoofManager.onPacketReceive(packet => {
    if (packet instanceof S08PacketPlayerPosLook) {
        return "DELAY"; // Delay the packet for now until we release it.
    }
    return "PROCESS";
});
```
