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

Returns

void

Example

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

Last updated