From d55939c116979b2a414ae6c6c9551b757246d386 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 24 May 2025 14:56:32 +0200 Subject: [PATCH] Add mStats --- pom.xml | 5 +++++ .../eu/m724/realweather/RealWeatherPlugin.java | 15 +++------------ src/main/resources/plugin.yml | 1 + 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 10e6151..fc574ba 100644 --- a/pom.xml +++ b/pom.xml @@ -53,6 +53,11 @@ jarupdater 0.1.8 + + eu.m724 + mstats-spigot + 0.1.2 + diff --git a/src/main/java/eu/m724/realweather/RealWeatherPlugin.java b/src/main/java/eu/m724/realweather/RealWeatherPlugin.java index 088413f..efcb2bc 100644 --- a/src/main/java/eu/m724/realweather/RealWeatherPlugin.java +++ b/src/main/java/eu/m724/realweather/RealWeatherPlugin.java @@ -7,9 +7,9 @@ import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.logging.Logger; +import eu.m724.mstats.MStatsPlugin; import eu.m724.wtapi.provider.exception.NoSuchProviderException; import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.plugin.java.JavaPlugin; import eu.m724.realweather.commands.AdminCommand; import eu.m724.realweather.commands.GeoCommand; @@ -30,7 +30,7 @@ import eu.m724.realweather.weather.WeatherMaster; import eu.m724.wtapi.provider.exception.ProviderException; // TODO unmess this too -public class RealWeatherPlugin extends JavaPlugin { +public class RealWeatherPlugin extends MStatsPlugin { private WeatherMaster weatherMaster; private ThunderMaster thunderMaster; private TimeMaster timeMaster; @@ -136,16 +136,7 @@ public class RealWeatherPlugin extends JavaPlugin { getCommand("localweather").setExecutor(new LocalWeatherCommand()); } - /*Metrics metrics = new Metrics(this, 15020); - metrics.addCustomChart(new SimplePie("weather_provider", () -> - GlobalConstants.weatherConfig.enabled ? GlobalConstants.weatherConfig.provider : "off" - )); - metrics.addCustomChart(new SimplePie("thunder_provider", () -> - GlobalConstants.thunderConfig.enabled ? GlobalConstants.thunderConfig.provider : "off" - )); - metrics.addCustomChart(new SimplePie("real_time", () -> - GlobalConstants.timeConfig.enabled() ? "on" : "off" - ));*/ + mStats(2); DebugLogger.info("ended loading", 1); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 8560a2c..100c949 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -10,6 +10,7 @@ main: eu.m724.realweather.RealWeatherPlugin libraries: - org.java-websocket:Java-WebSocket:1.6.0 +- eu.m724:mstats-spigot:0.1.2 commands: rwadmin: