diff --git a/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java b/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java index 4bff945a1..cce1946ba 100644 --- a/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java +++ b/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java @@ -9,6 +9,7 @@ import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.skills.utilities.SkillTools; +import com.gmail.nossr50.util.metrics.MetricsManager; public final class ChimaeraWing { private ChimaeraWing() {} @@ -49,6 +50,7 @@ public final class ChimaeraWing { player.teleport(player.getWorld().getSpawnLocation()); } + MetricsManager.chimeraWingUsed(); player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass")); } else if (!SkillTools.cooldownOver(recentlyHurt, 60, player) && amount >= Config.getInstance().getChimaeraCost()) { diff --git a/src/main/java/com/gmail/nossr50/util/metrics/MetricsManager.java b/src/main/java/com/gmail/nossr50/util/metrics/MetricsManager.java index c27779bda..b16a7de6b 100644 --- a/src/main/java/com/gmail/nossr50/util/metrics/MetricsManager.java +++ b/src/main/java/com/gmail/nossr50/util/metrics/MetricsManager.java @@ -13,10 +13,14 @@ import com.gmail.nossr50.locale.LocaleLoader; import com.turt2live.metrics.EMetrics; import com.turt2live.metrics.Metrics; import com.turt2live.metrics.Metrics.Graph; +import com.turt2live.metrics.tracker.Tracker; public class MetricsManager { private static boolean setup = false; + private static Tracker chimeraUseTracker; + private static Tracker chimeraServerUseTracker; + public static void setup() { if (setup) { return; @@ -183,6 +187,15 @@ public class MetricsManager { } }); + // Chimera Wing Usage Trackers + final String chimeraGraphName = "Chimera Wing Usage"; + + chimeraUseTracker = EMetrics.createBasicTracker(chimeraGraphName, "Player use"); + chimeraServerUseTracker = EMetrics.createEnabledTracker(chimeraGraphName, "Server use"); + + emetrics.addTracker(chimeraUseTracker); + emetrics.addTracker(chimeraServerUseTracker); + // Chimera Wing Enabled Graph Graph chimeraGraph = metrics.createGraph("Chimera Wing"); @@ -210,4 +223,9 @@ public class MetricsManager { } } } + + public static void chimeraWingUsed() { + chimeraUseTracker.increment(1); + chimeraServerUseTracker.increment(1); + } }