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 moduleWhat it blocksDefault action
nbt-packet-validationOversized (> 2 MiB), deeply nested (> 512), or millions-of-tags crash items & books.SKIP (drops bad packet)
crash-pattern-guardOversized custom plugin payloads and custom channel exploit signatures.SKIP
packet-flood-detectionConnections spamming more than 300 packets/sec (with a 600-packet burst buffer).SKIP
tick-starvation-guardSingle 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-limiterExtreme redstone clocks exceeding 4096 neighbor updates per chunk in a single tick.Defers excess updates in FIFO order
miscellaneous-securityRaw 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, SKIP safely drops or defers excess packets without disconnecting honest players.
  • Switch an action to DISCONNECT only 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: true

If 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: 4096

Fixing false positives with custom plugins

If players report that a complex custom-item plugin, schematic wand, or fast GUI menu occasionally ignores clicks:

  1. Check your server console for a sanitized [NusaSecurity] warning showing which guard triggered (nbt-packet-validation, packet-flood-detection, or tick-starvation-guard).
  2. Test quickly in-game with /nusa safemode on—if clicks immediately work, raise the matching threshold slightly (for example, rate-per-second: 500 or max-processing-micros: 4000) instead of turning all security off.
Nusa product documentation · NusaSpigotPaper fork · Java 21 / 25

Loading the index…