Commit 52708b14 authored by Amosar's avatar Amosar

Add metrics

parent 13a2e792
#En:Don't touch this value
#Fr: Ne pas modifier cette valeur
version: 0.7
#En:Enable metrics
#Fr: Activer metrics
metrics: true
#En:Maximal number Redstone blink authorized during the "Delay" period
#Fr:Nombre maximal de clignotement de redstone autorise pendant la periode "Delay"
MaxPulses: 150
......@@ -5,6 +5,7 @@ import com.trafalcraft.antiRedstoneClock.listener.ComparatorListener;
import com.trafalcraft.antiRedstoneClock.listener.ObserverListener;
import com.trafalcraft.antiRedstoneClock.listener.PistonListener;
import com.trafalcraft.antiRedstoneClock.listener.RedstoneListener;
import com.trafalcraft.antiRedstoneClock.metrics.Metrics;
import com.trafalcraft.antiRedstoneClock.util.Msg;
import org.bukkit.Bukkit;
import org.bukkit.Material;
......@@ -33,6 +34,16 @@ public class Main extends JavaPlugin {
if (instance.getConfig().getBoolean("metrics")) {
this.getLogger().info("Enabling Metrics");
try {
Metrics metrics = new Metrics(this);
this.getLogger().info("Metrics loaded");
} catch (Exception e) {
this.getLogger().info("An error occured while trying to enable metrics. Skipping...");
try {
} catch (YAMLException e) {
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment