> 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.onpacketsend.md).

# spoofManager.onPacketSend

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

Register the callback for outbound 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.onPacketSend(packet => {
    if (packet instanceof C0BPacketEntityAction && packet.getAction() === "START_SNEAKING") {
        return "CANCEL"; // Cancel sneaking packets
    }
    return "PROCESS";
});
```
