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
Returns
void
Example
spoofManager.onPacketSend(packet => {
if (packet instanceof C0BPacketEntityAction && packet.getAction() === "START_SNEAKING") {
return "CANCEL"; // Cancel sneaking packets
}
return "PROCESS";
});Last updated