1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-24 07:13:17 +02:00

Reenable Metrics

This commit is contained in:
snowleo
2012-10-03 13:32:56 +02:00
parent 4105ea4878
commit 3ad14f8fa8

View File

@@ -1,6 +1,5 @@
package net.ess3.metrics; package net.ess3.metrics;
import com.nijikokun.bukkit.Permissions.Permissions;
import java.util.Locale; import java.util.Locale;
import java.util.logging.Level; import java.util.logging.Level;
import lombok.Cleanup; import lombok.Cleanup;
@@ -32,11 +31,11 @@ public class MetricsStarter implements Runnable
public MetricsStarter(final IEssentials plugin) public MetricsStarter(final IEssentials plugin)
{ {
ess = plugin; ess = plugin;
/*
try try
{ {
final Metrics metrics = new Metrics(ess); final Metrics metrics = new Metrics(ess.getPlugin());
ess.setMetrics(metrics); ess.setMetrics(metrics);
@Cleanup @Cleanup
@@ -61,7 +60,7 @@ public class MetricsStarter implements Runnable
catch (Exception ex) catch (Exception ex)
{ {
metricsError(ex); metricsError(ex);
}*/ }
} }
@Override @Override
@@ -149,25 +148,19 @@ public class MetricsStarter implements Runnable
{ {
enabledGraph.addPlotter(new SimplePlotter("Warps")); enabledGraph.addPlotter(new SimplePlotter("Warps"));
} }
//todo - enable once settings are in if (ess.getSettings().getData().getCommands().getAfk().getAutoAFK() > 0)
/*
if (!ess.getSettings().areSignsDisabled())
{
enabledGraph.addPlotter(new SimplePlotter("Signs"));
}
if (ess.getSettings().getAutoAfk() > 0)
{ {
enabledGraph.addPlotter(new SimplePlotter("AutoAFK")); enabledGraph.addPlotter(new SimplePlotter("AutoAFK"));
} }
if (ess.getSettings().changeDisplayName()) if (ess.getSettings().getData().getChat().getChangeDisplayname())
{ {
enabledGraph.addPlotter(new SimplePlotter("DisplayName")); enabledGraph.addPlotter(new SimplePlotter("DisplayName"));
} }
if (ess.getSettings().getChatRadius() >= 1) if (ess.getSettings().getData().getChat().getLocalRadius() >= 1)
{ {
enabledGraph.addPlotter(new SimplePlotter("LocalChat")); enabledGraph.addPlotter(new SimplePlotter("LocalChat"));
} }
*/
final Graph depGraph = metrics.createGraph("Dependencies"); final Graph depGraph = metrics.createGraph("Dependencies");
final Method method = ess.getPaymentMethod().getMethod(); final Method method = ess.getPaymentMethod().getMethod();
if (method != null) if (method != null)
@@ -188,9 +181,6 @@ public class MetricsStarter implements Runnable
} }
depGraph.addPlotter(new SimplePlotter(method.getName() + " " + version)); depGraph.addPlotter(new SimplePlotter(method.getName() + " " + version));
} }
//todo - verify
depGraph.addPlotter(new SimplePlotter(Permissions.getInstance().getName()));
metrics.start(); metrics.start();
} }