Interface MetricsCustomizer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Adds custom charts to the bStats metrics that
ZetaCorePlugin creates
when ZetaPlugin.bstatsId() is set.
Provide implementations as services or beans; all of them are applied.
@Service
public class StorageMetrics implements MetricsCustomizer {
private final StorageConfig config;
public StorageMetrics(StorageConfig config) {
this.config = config;
}
@Override
public void customize(Metrics metrics) {
metrics.addCustomChart(new Metrics.SimplePie("storage_type", () -> config.type));
}
}
-
Method Summary
-
Method Details
-
customize
Adds charts to the metrics.- Parameters:
metrics- The plugin's metrics.
-