Skip to content

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 ​

PlatformTarget pluginCollectorLatest CI
PaperyesPassedpaper ✓
PurpuryesPassedpurpur ✓
FoliayesPassedfolia ✓
SpigotyesPassedspigot ✓
CraftBukkityesPassedbukkit ✓
SpongeyesNot yet—
VelocityyesPassedvelocity-3.5.1 ✓ · velocity-4.2.1 ✓
BungeeCordyesPassedbungeecord ✓
WaterfallyesPassedwaterfall ✓
GeyserunknownUnknown—

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.

KeyDefaultEnvironment variable
collector.packetstrueVANIA_METRICS_COLLECTOR_PACKETS
collector.packets.typesemptyVANIA_METRICS_COLLECTOR_PACKETS_TYPES

Minecraft 1.21.11 · core 0.6.0 · rebuilt after every CI run