DGuard

PacketEvents: what it is and how to update it

PacketEvents is a library plugin that other plugins use to read and send Minecraft packets. It changes nothing in the game by itself, but plugins that depend on it — like the DGuard anticheat — won't start without it. Updating: download the latest release, replace the jar, restart.

The DGuard team6 min read

PacketEvents is a protocol library for Minecraft Java Edition: it gives plugins a clean way to read and send the packets the client and server exchange. It adds nothing for players. You install it because another plugin requires it — an anticheat, for example. It updates like any plugin: latest release from Modrinth → replace the `.jar` in `plugins/` → restart.

What PacketEvents is

PacketEvents
WhatA protocol library for Minecraft Java Edition, built on Netty
Authorretrooper, who started the project in April 2020; booky10 is also on the Modrinth team
LicenseGPL-3.0, open source on GitHub
PlatformsPaper, Spigot, Folia, Purpur; Velocity; BungeeCord and Waterfall; Sponge; Fabric
ReleasesModrinth, GitHub Releases, SpigotMC
Developer buildsCodeMC Jenkins — not for production servers
From the project's README, its docs and its Modrinth page.

Why anticheats use a packet library

The client and server talk in packets: movement, camera rotation, an attack, starting and finishing a block break, an inventory click — each action has its own packet. The regular plugin API (Bukkit) shows already-processed events like "player hit a mob", not the raw stream of packets in the order the client sent them.

You can reach raw packets without a library, but then the plugin digs into the server's internal classes, which change from version to version, and the author has to rewrite code for each one. A library takes that on: one API across every supported version and platform.

An anticheat lives on the packet stream. Timer shows up in the rate of movement packets, BadPackets in packets an honest client can't send. DGuard goes further: the team took the Minecraft 1.21.11 client apart down to the packet, and an honest client sends packets within a tick in a strict order. A cheat breaks it — KillAura, for example, turns the camera right before the hit — and lag can't do that. More in packet order.

How to install it

  1. 1

    Open the Modrinth page

    modrinth.com/plugin/packetevents, the Versions tab. Filter by the Paper loader and the Release channel.

  2. 2

    Download the right file

    For Paper and Leaf it's packetevents-spigot-<version>.jar. The …-sources.jar next to it is source code for developers — don't put it on the server.

  3. 3

    Put it into plugins/ and restart

    One copy per server: every plugin that needs it shares it. Check /plugins — PacketEvents should be green.

Release or dev build

Releases go out on Modrinth, GitHub and SpigotMC. Between them, CodeMC's Jenkins builds developer builds with SNAPSHOT-style versions. They exist to test a fix before release, not to run on a server full of players.

DGuard runs on the latest PacketEvents release only; dev and SNAPSHOT builds won't do. You don't have to track it by hand: the DGuard panel takes the latest release from Modrinth, shows the PacketEvents status for each server and lets you know when it's time to update. From the console, /dguard license shows the version next to your plan and license state.

The latest release matters for more than bug fixes. Each PacketEvents version knows the protocols of specific Minecraft versions — Modrinth lists them for every file. Move the server to a new game version without a fresh PacketEvents release, and the plugins that rely on it may not understand the new packets.

How to update PacketEvents

  1. 1

    Check the current version

    /version packetevents in game or the console. With DGuard, /dguard license or the server card in the panel, which also shows the latest release.

  2. 2

    Download the latest release

    From Modrinth, filtered to Paper + Release: packetevents-spigot-<version>.jar.

  3. 3

    Swap the file

    Stop the server, delete the old packetevents-…jar from plugins/ and add the new one. Two versions in the folder mean errors on startup, guaranteed.

  4. 4

    Start and check

    The server starts without errors, PacketEvents is green in /plugins, and the DGuard panel shows the new status. /reload won't do — restart: here's why.

PacketEvents on a server network

On a BungeeCord or Velocity network, DGuard goes on every game server with its own key — so PacketEvents is needed on every game server next to it. The proxy itself only needs PacketEvents if a proxy plugin requires it: the project has separate builds for Velocity and BungeeCord. Network basics are in Velocity or BungeeCord.

"No PacketEvents" and other problems

What you seeCauseFix
DGuard panel: "No PacketEvents"PacketEvents isn't in plugins/ or failed to load. DGuard doesn't start protection without itAdd the latest release from Modrinth — not a dev build — and restart
The panel says a new release is outYour version is outdatedUpdate with the steps above
The panel flags a developer buildA dev or SNAPSHOT build is installedReplace it with the latest release
PacketEvents missing or red in /pluginsWrong platform file (a Velocity build, say) or an error on startupUse the spigot build and read the error in the console
Errors on startup after an updateTwo versions left in plugins/Keep one — the new one

Other connection problems — the server doesn't show up in the panel, the key isn't accepted — are covered on the DGuard install page.

FAQ

What is PacketEvents in Minecraft?

A library plugin that other plugins use to read and send Minecraft packets. It changes nothing in the game itself; you install it for plugins that require it, such as anticheats.

Where do I download PacketEvents?

Releases are on Modrinth, GitHub Releases and SpigotMC. For Paper and Leaf you need packetevents-spigot-<version>.jar, without the sources suffix.

Can I use a PacketEvents dev build?

Not on a production server: dev and SNAPSHOT builds are for developers testing fixes. DGuard runs on the latest release only.

How do I update PacketEvents?

Download the latest release from Modrinth, stop the server, replace the old jar in plugins/ with the new one and start the server again. No /reload.

Do I need PacketEvents on a Velocity proxy?

Only if a plugin on the proxy itself requires it — there's a separate Velocity build. For DGuard, PacketEvents is needed on every game server that runs the anticheat.

Why does DGuard say "No PacketEvents"?

PacketEvents isn't on the server or failed to load, and DGuard doesn't start protection without it. Put the latest release from Modrinth into plugins/ and restart.

Sources

All sections

Run the best anticheat for modern Minecraft

DGuard catches all 47 kinds of cheats in our comparison — the closest rival, Intave, has 27. Full protection on every plan, free up to 30 players online.