Spoof Manager
The spoofManager namespace lets your script intercept, cancel, delay, and release packets in both directions. Like the rotation manager, it uses a priority system for when multiple scripts are active.
This manager is mainly meant for making lag based modules. For basic packet manipulation we recommend PacketSendEvent.
Setup
Set your priority during initialization.
spoofManager.setPriority(10);Intercepting Packets
onPacketSend
Called for every outbound packet (client β server). Return a SpoofAction to decide what happens to it.
spoofManager.onPacketSend((packet) => {
if (packet instanceof C0BPacketEntityAction) {
if (packet.getAction() === "START_SNEAKING") {
return "CANCEL"; // block sneak packets from reaching the server
}
}
return "PROCESS"; // let everything else through
});onPacketReceive
Called for every inbound packet (server β client). Same SpoofAction return values apply.
SpoofAction Values
"PROCESS"
Do nothing, let the packet continue as normal
"CANCEL"
Drop the packet entirely β it will never be processed
"DELAY"
Hold the packet until you manually release it
Releasing Delayed Packets
onUpdate
Called every tick when there are delayed packets waiting. Use this to decide when to release them.
Each DelayedPacket exposes:
packet
The original Packet object
time
Epoch ms timestamp of when it was delayed
direction()
"IN" or "OUT"
hasAged(ms)
true if the packet has been held for at least ms milliseconds
Flushing Packets
If you need to release everything at once β for example when the script is disabled β use the flush helpers.
Always call
flushAll()in yourscript.onDisablecallback to avoid packets being stuck indefinitely.
Sending Packets Manually
You can also inject your own packets directly to the server.
Last updated