Skip to content

Commit

Permalink
fix: Metrics Logging
Browse files Browse the repository at this point in the history
Setting Metrics-Logging to false in the config.yml ended up doing nothing because the value wasn't being checked programmatically.
  • Loading branch information
RockinChaos committed Oct 3, 2024
1 parent 7c3c8fd commit 6e0b69e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/me/RockinChaos/itemjoin/PluginData.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,13 @@ public void registerClasses(final boolean silent) {
});
{
runAsyncLater(100L, () -> {
final MetricsAPI metrics = new MetricsAPI(ItemJoin.getCore().getPlugin(), 4115);
metrics.addCustomChart(new SimplePie("items", () -> ItemUtilities.getUtilities().getItems().size() + " "));
metrics.addCustomChart(new SimplePie("itemPermissions", () -> ItemJoin.getCore().getConfig("config.yml").getBoolean("Permissions.Obtain-Items") ? "True" : "False"));
ItemJoin.getCore().getDependencies().addCustomCharts(metrics);
ServerUtils.sendErrorStatements(null);
if (ItemJoin.getCore().getConfig("config.yml").getBoolean("General.Metrics-Logging")) {
final MetricsAPI metrics = new MetricsAPI(ItemJoin.getCore().getPlugin(), 4115);
metrics.addCustomChart(new SimplePie("items", () -> ItemUtilities.getUtilities().getItems().size() + " "));
metrics.addCustomChart(new SimplePie("itemPermissions", () -> ItemJoin.getCore().getConfig("config.yml").getBoolean("Permissions.Obtain-Items") ? "True" : "False"));
ItemJoin.getCore().getDependencies().addCustomCharts(metrics);
ServerUtils.sendErrorStatements(null);
}
});
}
}
Expand Down

0 comments on commit 6e0b69e

Please sign in to comment.