Skip to content
Înapoi la Blog
bStats metrics dashboard displaying Minecraft server statistics and player data charts

bStats Metrics: Track Your Minecraft Server's Growth and Performance

ice
ice
@ice
Updated
63 vizualizări
TL;DR:bStats is a lightweight metrics collection system that helps Minecraft server admins track player counts, server versions, and plugin usage without slowing performance. Install via build tools or single-file copy-paste. Read how to set it up.

"The different bStats Metrics classes"

Bastian/bstats-metrics · github.com
⭐ 120 stars💻 Java📜 MIT

Ever wondered how many players actually visit your Minecraft server each month? Or which version your players use most? bStats is the standard way server admins get real answers to these questions without tanking performance. It's been around long enough to become the industry default, and for good reason.

What bStats Does

bStats is a lightweight metrics collection system for Minecraft servers and plugins. It tracks basic server data - player count, server version, installed plugins, Java version - and sends it to a public dashboard where you can watch trends over time. The key word here's "lightweight." It won't slow your server down or pump your logs full of garbage.

The data flows like this: your server collects metrics locally, bundles them into a POST request, ships them to bStats.org's servers once per day, and you get a persistent public chart. Think of it as Google Analytics for Minecraft servers.

The latest version (3.2.1) is stable and even fixed a crash that was affecting Hytale integration, so it's actively maintained.


Why Server Admins Use This

If you're running a survival server, a faction network, or even a small private SMP with friends, you probably want to know what's happening. bStats lets you answer real questions:

  • Who's still playing? Watch your player count trend to spot when interest drops or spikes.
  • What version are they on? See the breakdown: how many 1.20 players vs 1.21 vs snapshots.
  • Which plugins matter? If you're running 47 plugins, which ones are actually worth maintaining?
  • Java version mix. Helps you know when it's safe to upgrade your server to a newer Java LTS.

The dashboard is public by default (you get a shareable link), which is honestly great for community bragging rights. "Look, we've had 10k unique players this month." Real players like seeing that their server is active and tracked.

Plugin developers use bStats the same way - to see adoption rates and understand which server versions their plugins run on.


How to Install bStats (Two Paths)

bStats offers a fork in the road: the simple way and the proper way.

Path 1: Single-File (Copy-Paste for Beginners)

The maintainers auto-generate a standalone Metrics class on each release and push it to the `single-file` branch. If you're writing a small plugin, you can literally copy one Java file into your project and call it done.

bash
git clone - branch single-file https://github.com/Bastian/bstats-metrics.git
cd bstats-metrics
# Then copy the platform-specific folder (e.g., bukkit/src/main/java/...) into your plugin

Drop the generated Metrics class into your plugin's package, instantiate it with your plugin ID, and you're tracking. No Maven Central dependency, no shading, no build config headaches. This is the path most smaller plugins take, and it works.

Path 2: Build Tools (Maven/Gradle)

If you're building a real project with proper dependencies, you'll want to use Maven or Gradle with shading and relocation to avoid conflicts.

Add bStats as a dependency (it's published to Maven Central) and use your build tool to shade and relocate it into your plugin JAR. The README shows the exact Gradle/Maven snippets. This keeps your codebase clean and makes it trivial to update bStats later.

The advantage here: when you run `gradlew generateMetrics`, it produces optimized bytecode specific to your platform (Bukkit, Bungee, Velocity, etc.). You're not copy-pasting; the build tool does the work.


Key Features That Matter

bStats works because it does a few things really well and doesn't overcomplicate.

Non-invasive tracking. It doesn't log IPs, email addresses, or player UUIDs. The dashboard shows aggregate stats ("50% of your players run 1.20.1", not "player X joined at time Y"). If you care about privacy - and you should - this is clean.

Platform-specific metrics classes. Bukkit, Bungee, Velocity, Waterfall, Minestom... each platform has its own generated class. You're not jury-rigging a universal metrics system; bStats was built to know the difference between a Bukkit plugin and a Velocity proxy.

Custom charts. Beyond the defaults, you can register custom metrics (e.g., "percentage of players in creative mode" or "average mob count"). You define the data, bStats handles the dashboard visualization.

Dead-simple API. Instantiate the Metrics object with your plugin ID and your plugin object. Done. One line if you like defaults, a few more if you want custom charts. No JWT tokens, no webhooks, no OAuth headaches.


Gotchas and Tips

Using bStats is straightforward, but there are a few rough edges worth knowing.

First: your plugin needs a bStats project ID, which you register on bstats.org. Don't hardcode a random number and hope for the best - multiple plugins with the same ID will mess up the stats and everyone's confused.

Second, the single-file method is genuinely fast to get started, but it duplicates code if multiple plugins on the same server each include their own copy of the Metrics class. This isn't a huge deal (the class is small), actually - just worth knowing if you're auditing your plugin JAR.

Third, some server admins have metrics disabled via config (most server software gives an opt-out). bStats respects that - your metrics just won't report. Real talk, this is the right behavior, but it means your dashboard might be incomplete if a lot of servers have bStats disabled. Most don't, though.

One last thing: if you're running a Minecraft server and want to understand traffic patterns, bStats pairs well with other tools. It gives you high-level health checks (are players still joining?), but if you need deep dive network analysis, you might also check tools like our Votifier Tester to verify vote tracking works, or if you're customizing player skins, the Skin Creator tool helps you visualize changes across your player base.


Alternatives Worth Knowing About

bStats isn't the only metrics game in town, though it's the market leader for good reason.

Prometheus + Grafana. Way overkill for most servers, but if you're running a massive network with dozens of servers, you might set up Prometheus collectors on each one and a central Grafana dashboard. You own the data, you own the infrastructure. Trade-off: you're hosting and maintaining it yourself.

Custom tracking. You could write your own metrics system and send it to your own database. Some large networks do this because they need custom metrics that bStats doesn't offer. Again: full control, full responsibility.

But for 99% of server admins? bStats is the right answer. It's free, it's reliable, and the public dashboard is actually kind of cool to share.

Frequently Asked Questions

Is bStats free to use?
Yes. bStats is completely free and open-source (MIT licensed). There's no cost to register a server, track metrics, or access your dashboard. The public charts are free to share.
Does bStats track individual player data or just aggregate stats?
bStats tracks aggregate data only. It won't log player IPs, UUIDs, or join times. You'll see 'X% of players run version Y,' not individual player information. Privacy is built in.
Can I disable bStats on my server?
Yes. Most server software (Bukkit, Bungee, Velocity) lets you disable bStats in the config file. If disabled, no metrics are sent. bStats respects this setting.
What's the difference between the single-file and Maven/Gradle versions?
Single-file is a copy-paste Java class for beginners—fast to add to small plugins. Maven/Gradle is for professional projects with proper dependency management and automatic updates. Both produce the same result.
Can I track custom metrics beyond the defaults?
Yes. bStats lets you register custom charts (e.g., percentage of players in creative mode). You define the data and report it; bStats handles the dashboard visualization.