Minestom
Integrate FastStats with Minestom servers
Use dev.faststats.minestom.FastStatsMinestom for Minestom servers. Requires Java 25+.
Artifact: dev.faststats.metrics:minestom
import dev.faststats.ErrorTracker;
import dev.faststats.FastStatsContext;
import dev.faststats.Metrics;
import dev.faststats.minestom.FastStatsMinestom;
import net.minestom.server.MinecraftServer;
public final class ExampleServer {
public static final ErrorTracker ERROR_TRACKER = ErrorTracker.contextAware();
public static void main(String[] args) {
MinecraftServer server = MinecraftServer.init();
FastStatsContext context = FastStatsMinestom.builder()
.token("YOUR_TOKEN")
.errorTrackerService(ERROR_TRACKER)
.metrics(Metrics.Factory::create)
.build();
server.start("0.0.0.0", 25565);
context.ready();
}
} Call context.ready() after MinecraftServer.init() before using metrics or error tracking. This also registers exception handlers. See Error Tracking for configuring error reporting.
Replace YOUR_TOKEN with your project token. To keep it out of your git
repository, inject it at build time instead of
hardcoding it.