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:
| Platform | Artifact ID | Java Versions |
|---|---|---|
| Bukkit/Spigot/Paper/Folia… | bukkit | 17+ |
| BungeeCord | bungeecord | 17+ |
| Fabric/Quilt | fabric | 17+ |
| Forge | forge | 21+ |
| Hytale | hytale | 25+ |
| Minestom | minestom | 25+ |
| NeoForge | neoforge | 21+ |
| Nukkit | nukkit | 17+ |
| Sponge | sponge | 17+ |
| Velocity | velocity | 21+ |
Fabric, Forge and NeoForge artifacts include the SDK version and the exact Minecraft version you want to target:
implementation("dev.faststats.metrics:fabric:0.31.0+mc26.3")
include("dev.faststats.metrics:fabric:0.31.0+mc26.3")
implementation("dev.faststats.metrics:forge:0.31.0+mc26.3")
jarJar.configurationName("dev.faststats.metrics:forge:0.31.0+mc26.3")
implementation("dev.faststats.metrics:neoforge:0.31.0+mc26.3")
jarJar("dev.faststats.metrics:neoforge:0.31.0+mc26.3")Use both implementation and include/jarJar for modded platforms. FastStats is
provided as a mod through jar-in-jar, so implementation puts it on your compile
classpath and include/jarJar bundles it into your mod JAR.
The version format is {sdk-version}+mc{minecraft-version}, where
{sdk-version} is the FastStats SDK version and {minecraft-version} is the
exact Minecraft version you are targeting. Each artifact is built for a single
Minecraft version, so pick the one matching your mod.
You can find the available versions in the Maven repository: Fabric, Forge 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.31.0</version>
</dependency>implementation("dev.faststats.metrics:bukkit:0.31.0")implementation "dev.faststats.metrics:bukkit:0.31.0""dev.faststats.metrics" %% "bukkit" %% "0.31.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. Their versions
are published separately from the standard Java artifacts:
| Package | Java 8 Artifact |
|---|---|
| Bukkit | dev.faststats.metrics.j8:bukkit |
| BungeeCord | dev.faststats.metrics.j8:bungeecord |
| Config | dev.faststats.metrics.j8:config |
| Core | dev.faststats.metrics.j8:core |
| Nukkit | dev.faststats.metrics.j8:nukkit |
| Sponge | dev.faststats.metrics.j8:sponge |
For example, if your Bukkit plugin must stay on Java 8, use the Java 8 group ID and its latest published version:
<dependency>
<groupId>dev.faststats.metrics.j8</groupId>
<artifactId>bukkit</artifactId>
<version>0.30.2</version>
</dependency>implementation("dev.faststats.metrics.j8:bukkit:0.30.2")implementation "dev.faststats.metrics.j8:bukkit:0.30.2""dev.faststats.metrics.j8" %% "bukkit" %% "0.30.2"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
}