diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/Metrics.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/Metrics.java index b7c1a9b3a..b5d53e940 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/Metrics.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/Metrics.java @@ -79,6 +79,9 @@ public class Metrics { // The plugin private final Plugin plugin; + // The plugin id + private final int bstatsId; + // A list with all custom charts private final List charts = new ArrayList<>(); @@ -86,13 +89,14 @@ public class Metrics { * Class constructor. * * @param plugin The plugin which stats should be submitted. - * @param bstatsId ID of the plugin + * @param bstatsId The ID of the plugin. It can be found in the url when you open the plugin on bStats. */ public Metrics(Plugin plugin, int bstatsId) { if (plugin == null) { throw new IllegalArgumentException("Plugin cannot be null!"); } this.plugin = plugin; + this.bstatsId = bstatsId; // Get the config file File bStatsFolder = new File(plugin.getDataFolder().getParentFile(), "bStats"); @@ -207,6 +211,7 @@ public class Metrics { String pluginVersion = plugin.getDescription().getVersion(); data.put("pluginName", pluginName); // Append the name of the plugin + data.put("id", bstatsId); // Append the id of the plugin data.put("pluginVersion", pluginVersion); // Append the version of the plugin JSONArray customCharts = new JSONArray(); for (CustomChart customChart : charts) {