diff --git a/build.gradle.kts b/build.gradle.kts index f1e6bc1..74c65d9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,8 @@ plugins { id("com.gradleup.shadow") version "8.3.3" } -setupMC("xyz.srnyx", "5.1.2", "General purpose API with tons of features") +// Don't forget to change AnnoyingPlugin#ANNOYING_API_VERSION when updating +setupMC("xyz.srnyx", "5.1.2", "General purpose API with tons of features", replacementFiles = setOf("plugin.yml", "AnnoyingStats.class")) spigotAPI("1.8.8") // Dependencies diff --git a/src/main/java/xyz/srnyx/annoyingapi/AnnoyingPlugin.java b/src/main/java/xyz/srnyx/annoyingapi/AnnoyingPlugin.java index 1b01394..677caff 100644 --- a/src/main/java/xyz/srnyx/annoyingapi/AnnoyingPlugin.java +++ b/src/main/java/xyz/srnyx/annoyingapi/AnnoyingPlugin.java @@ -65,6 +65,10 @@ public void log(@NotNull LogRecord logRecord) { super.log(logRecord); } }; + /** + * The version of the Annoying API the plugin is using + */ + @NotNull public static final SemanticVersion ANNOYING_API_VERSION = new SemanticVersion(5, 1, 2); /** * The Minecraft version the server is running */ diff --git a/src/main/java/xyz/srnyx/annoyingapi/AnnoyingStats.java b/src/main/java/xyz/srnyx/annoyingapi/AnnoyingStats.java index 90eafc0..2913630 100644 --- a/src/main/java/xyz/srnyx/annoyingapi/AnnoyingStats.java +++ b/src/main/java/xyz/srnyx/annoyingapi/AnnoyingStats.java @@ -24,6 +24,7 @@ public class AnnoyingStats { public AnnoyingStats(@NotNull AnnoyingPlugin plugin) { // API final Metrics api = new Metrics(plugin, 18281); + api.addCustomChart(new SimplePie("annoying_api_version", AnnoyingPlugin.ANNOYING_API_VERSION::toString)); api.addCustomChart(new SimplePie("plugins", plugin::getName)); api.addCustomChart(new SimplePie("storage_method", () -> plugin.dataManager == null ? "N/A" : plugin.dataManager.storageConfig.method.name()));