Blocks every packet whose id matches id. This is a blanket block by packet type, applied without running your hooks.
RakNet is off by default. The library exists only when the RakNet feature is enabled in the Athena loader, and it is published on getgenv() rather than as a plain global. Guard your code with if getgenv().raknet then ... end, or read raknet.is_enabled.

Parameters

number
required
The packet id to block, i.e. the packet’s first byte.

Behavior

  • It is by id, not by direction or content. For conditional blocking use add_send_hook and packet:Block().
  • Blocks are counted. The blocked counter in stats rises as packets are dropped.
  • Blocking core packet types will break your connection. Be specific.

Example

Errors