PacketSendObserver

public final class PacketSendObserver

Lets the consuming plugin observe packets that are sent directly (via connection.send), outside of any AbstractPacketBundle. The FMM packet sampler registers an observer so its per-tick report includes these unbundled sends (hitbox teleports, head rotations, mounts, etc.) that the bundle-wrapping sampler can't see.

No-op unless an observer is registered. The observer itself is expected to be cheap and to ignore sends when it isn't actively sampling.

Types

Link copied to clipboard
public interface Observer
Receives one call per direct broadcast: the packet and how many viewers it went to.

Functions

Link copied to clipboard
public static boolean isActive()
Link copied to clipboard
public static void observe(Object packet, int viewerCount)
Link copied to clipboard
public static void setImpl(PacketSendObserver.Observer observer)