Security & anti-crash guards
Protect your server against oversized NBT payloads, packet floods, tick starvation, and redstone lag machines.
On this page
NusaSpigot includes six built-in security layers enabled by default in nusa-global.yml. Most guards operate at the network decoder or chunk scheduler level before malicious inputs can allocate gigabytes of RAM or freeze your main thread.
Built-in protection overview
| Guard module | What it blocks | Default action |
|---|---|---|
nbt-packet-validation | Oversized (> 2 MiB), deeply nested (> 512), or millions-of-tags crash items & books. | SKIP (drops bad packet) |
crash-pattern-guard | Oversized custom plugin payloads and custom channel exploit signatures. | SKIP |
packet-flood-detection | Connections spamming more than 300 packets/sec (with a 600-packet burst buffer). | SKIP |
tick-starvation-guard | Single players consuming over 64 packets or 2000 µs (2 ms) of main-thread time in one tick. | SKIP (queues excess to next tick) |
redstone-abuse-limiter | Extreme redstone clocks exceeding 4096 neighbor updates per chunk in a single tick. | Defers excess updates in FIFO order |
miscellaneous-security | Raw BlockEntityTag placement exploits (opt-in) and rapid World Downloader (wdl:request) spam. | SKIP |
Why SKIP is safer than DISCONNECT
Every packet guard defaults to action: SKIP rather than kicking players immediately:
- If a player hits a temporary Wi-Fi lag spike or clicks rapidly inside a custom GUI plugin,
SKIPsafely drops or defers excess packets without disconnecting honest players. - Switch an action to
DISCONNECTonly when you intentionally want to kick connections that trigger that guard.
Hardening Creative or untrusted public servers
On Creative plots or servers where players can spawn custom items, turn on placed-block raw NBT filtering so players cannot place chests or signs containing hidden crash tags:
security:
miscellaneous-security:
disable-placed-block-nbt-reading: trueIf you want to block a specific exploit plugin channel literal, you can add a rule under crash-pattern-guard.patterns:
security:
crash-pattern-guard:
action: DISCONNECT
patterns:
- id: block-bad-channel
channel: 'custom:exploit'
max-bytes: 4096Fixing false positives with custom plugins
If players report that a complex custom-item plugin, schematic wand, or fast GUI menu occasionally ignores clicks:
- Check your server console for a sanitized
[NusaSecurity]warning showing which guard triggered (nbt-packet-validation,packet-flood-detection, ortick-starvation-guard). - Test quickly in-game with
/nusa safemode on—if clicks immediately work, raise the matching threshold slightly (for example,rate-per-second: 500ormax-processing-micros: 4000) instead of turning all security off.