PacketEvents
collector-packetevents · version 0.6.0 · registers as packets · CI 2026-09-25
The packet counter.
The work happens in the listener, not in collect: every packet increments a counter, and the scrape only reads. This is the reverse of the other collectors, and it's the only tenable way to measure something that happens ten thousand times a second.
Packet size is not published, and that's not an oversight: PacketEvents' API exposes no byte length on its events — checked on ProtocolPacketEvent and PacketReceiveEvent. Measuring it would mean reading Netty's ByteBuf by reflection, on the network thread, for every packet. Not worth it.
Install
Put vania-metrics-collector-packetevents-0.6.0.jar in the plugins folder, next to the core and to PacketEvents, then restart. The collector depends on both: without PacketEvents it stays disabled, and the core keeps running.
- Target plugin: PacketEvents 2.13.0 — latest for Minecraft 1.21.11: 2.13.0
- Built against: core v0.6.0
- Download: vania-metrics-collector-packetevents-0.6.0.jar, with its SHA-512, from the v0.6.0 release
- Collects: on events, as they happen
- Tested on: Java 21
- Latest CI: success · 2026-09-25 21:37 UTC · commit
c01b35e· run
Platforms
| Platform | Target plugin | Collector | Latest CI |
|---|---|---|---|
| Paper | yes | Passed | paper ✓ |
| Purpur | yes | Passed | purpur ✓ |
| Folia | yes | Passed | folia ✓ |
| Spigot | yes | Passed | spigot ✓ |
| CraftBukkit | yes | Passed | bukkit ✓ |
| Sponge | yes | Not yet | — |
| Velocity | yes | Passed | velocity-3.5.1 ✓ · velocity-4.2.1 ✓ |
| BungeeCord | yes | Passed | bungeecord ✓ |
| Waterfall | yes | Passed | waterfall ✓ |
| Geyser | unknown | Unknown | — |
See the compatibility matrix for every collector at once.
Metrics
mc_network_packets_total
counter direction packet_type
Packets crossing the server. direction = in|out. packet_type is bounded by collector.packets.types; everything else falls into "other".
mc_network_players_by_protocol
gauge protocol version_name
Players by protocol version. PacketEvents is the only one that knows it: org.bukkit.entity.Player doesn't expose it.
Configuration
In metrics.properties, or as environment variables. See Configuration.
| Key | Default | Environment variable |
|---|---|---|
collector.packets | true | VANIA_METRICS_COLLECTOR_PACKETS |
collector.packets.types | empty | VANIA_METRICS_COLLECTOR_PACKETS_TYPES |