Installation

Add FastStats to your Minecraft server project

Add the FastStats SDK to your project using Maven or Gradle.

<repository>
  <id>faststats-releases</id>
  <name>FastStats</name>
  <url>https://repo.faststats.dev/releases</url>
</repository>
maven {
  name = "faststatsReleases"
  url = uri("https://repo.faststats.dev/releases")
}
maven {
  name "faststatsReleases"
  url "https://repo.faststats.dev/releases"
}
resolvers += 
  "faststats-releases" 
    at "https://repo.faststats.dev/releases"

Platform-Specific Artifacts

Choose the artifact for your platform:

PlatformArtifact IDJava Versions
Bukkit/Spigot/Paper/Folia…bukkit17+
BungeeCordbungeecord17+
Fabricfabric21+
Hytalehytale25+
Minestomminestom25+
NeoForgeneoforge21+
Nukkitnukkit17+
Spongesponge17+
Velocityvelocity21+

Fabric and NeoForge artifacts include the SDK version and the Minecraft version range you want to target:

implementation("dev.faststats.metrics:fabric:0.29.0+mc26.1-26.3")
include("dev.faststats.metrics:fabric:0.29.0+mc26.1-26.3")

implementation("dev.faststats.metrics:neoforge:0.29.0+mc26.1-26.2")
include("dev.faststats.metrics:neoforge:0.29.0+mc26.1-26.2")

Use both implementation and include for modded platforms. FastStats is provided as a mod through jar-in-jar, so implementation puts it on your compile classpath and include bundles it into your mod JAR.

The version format is {sdk-version}+mc{from}-{to}, where {sdk-version} is the FastStats SDK version and {from}-{to} is the supported Minecraft version range for that artifact.

You can find the available versions in the Maven repository: Fabric and NeoForge.

All other platforms use the SDK version without a Minecraft version suffix.

<dependency>  <groupId>dev.faststats.metrics</groupId>  <artifactId>bukkit</artifactId>  <version>0.29.0</version></dependency>
implementation("dev.faststats.metrics:bukkit:0.29.0")
implementation "dev.faststats.metrics:bukkit:0.29.0"
"dev.faststats.metrics" %% "bukkit" %% "0.29.0"

Java 8 Fallback Artifacts

Use the standard Java 17+ artifacts above whenever possible. Java 8 artifacts are provided only as a last resort for projects that absolutely cannot run on Java 17.

Java 8 artifacts use the dev.faststats.metrics.j8 group ID. The artifact IDs and versions are the same as the standard Java artifacts:

PackageJava 8 Artifact
Bukkitdev.faststats.metrics.j8:bukkit
BungeeCorddev.faststats.metrics.j8:bungeecord
Configdev.faststats.metrics.j8:config
Coredev.faststats.metrics.j8:core
Nukkitdev.faststats.metrics.j8:nukkit
Spongedev.faststats.metrics.j8:sponge

For example, if your Bukkit plugin must stay on Java 8, change only the group ID:

<dependency>  <groupId>dev.faststats.metrics.j8</groupId>  <artifactId>bukkit</artifactId>  <version>0.29.0</version></dependency>
implementation("dev.faststats.metrics.j8:bukkit:0.29.0")
implementation "dev.faststats.metrics.j8:bukkit:0.29.0"
"dev.faststats.metrics.j8" %% "bukkit" %% "0.29.0"

Shading

To include FastStats directly in your plugin JAR, you can use the Maven Shade or Gradle Shadow Plugin.

<build>  <plugins>      <plugin>          <groupId>org.apache.maven.plugins</groupId>          <artifactId>maven-shade-plugin</artifactId>          <version>3.5.0</version>          <executions>              <execution>                  <phase>package</phase>                  <goals>                      <goal>shade</goal>                  </goals>                  <configuration>                      <relocations>                          <relocation>                              <pattern>dev.faststats</pattern>                              <shadedPattern>your.plugin.libs.faststats</shadedPattern>                          </relocation>                      </relocations>                  </configuration>              </execution>          </executions>      </plugin>  </plugins></build>
plugins {  id("com.gradleup.shadow") version "9.4.1"}tasks.shadowJar {relocate("dev.faststats", "your.plugin.libs.faststats") // optionally relocate the package}
plugins {  id 'com.gradleup.shadow' version '9.4.1'}tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {relocate('dev.faststats', 'your.plugin.libs.faststats') // optionally relocate the package}

On this page