feat: add block place and craft metrics
Build / build (push) Successful in 4m54s

This commit is contained in:
dmg
2026-01-27 22:34:59 -05:00
parent 2648897197
commit dc539e83d1
4 changed files with 60 additions and 0 deletions
@@ -2,10 +2,12 @@ package com.prometheus.spigot;
import com.prometheus.spigot.http.MetricsHttpHandler;
import com.prometheus.spigot.listeners.BlockBreakListener;
import com.prometheus.spigot.listeners.BlockPlaceListener;
import com.prometheus.spigot.listeners.ChatListener;
import com.prometheus.spigot.listeners.ChunkListener;
import com.prometheus.spigot.listeners.CommandListener;
import com.prometheus.spigot.listeners.ConnectionListener;
import com.prometheus.spigot.listeners.CraftListener;
import com.prometheus.spigot.listeners.DeathListener;
import com.prometheus.spigot.listeners.MoveListener;
import com.prometheus.spigot.listeners.PluginListener;
@@ -71,6 +73,7 @@ public final class PrometheusSpigotPlugin extends JavaPlugin {
private void registerListeners() {
var pluginManager = getServer().getPluginManager();
pluginManager.registerEvents(new BlockBreakListener(metricsRegistry), this);
pluginManager.registerEvents(new BlockPlaceListener(metricsRegistry), this);
pluginManager.registerEvents(new DeathListener(metricsRegistry), this);
pluginManager.registerEvents(new ChatListener(metricsRegistry), this);
pluginManager.registerEvents(new MoveListener(metricsRegistry, countBlockMovementOnly), this);
@@ -78,6 +81,7 @@ public final class PrometheusSpigotPlugin extends JavaPlugin {
pluginManager.registerEvents(new CommandListener(metricsRegistry), this);
pluginManager.registerEvents(new ChunkListener(metricsRegistry), this);
pluginManager.registerEvents(new PluginListener(metricsRegistry), this);
pluginManager.registerEvents(new CraftListener(metricsRegistry), this);
}
private void startHttpServer() {