EvtSkript.onSkriptStart();
final Metrics metrics = new Metrics(Skript.this);
final Graph scriptData = metrics.createGraph("data");
scriptData.addPlotter(new Plotter("scripts") {
@Override
public int getValue() {
return ScriptLoader.loadedScripts();
}
});
scriptData.addPlotter(new Plotter("triggers") {
@Override
public int getValue() {
return ScriptLoader.loadedTriggers();
}
});
scriptData.addPlotter(new Plotter("commands") {
@Override
public int getValue() {
return ScriptLoader.loadedCommands();
}
});
scriptData.addPlotter(new Plotter("functions") {
@Override
public int getValue() {
return ScriptLoader.loadedFunctions();
}
});
scriptData.addPlotter(new Plotter("variables") {
@Override
public int getValue() {
return Variables.numVariables();
}
});
final Graph language = metrics.createGraph("language");
language.addPlotter(new Plotter() {
@Override
public int getValue() {
return 1;
}
@Override
public String getColumnName() {
return Language.getName();
}
});
final Graph similarPlugins = metrics.createGraph("similar plugins");
for (final String plugin : new String[] {"VariableTriggers", "CommandHelper", "Denizen", "rTriggers", "kTriggers", "TriggerCmds", "BlockScripts", "ScriptBlock", "buscript", "BukkitScript"}) {
assert plugin != null;
similarPlugins.addPlotter(new Plotter(plugin) {
@Override
public int getValue() {
return Bukkit.getPluginManager().getPlugin(plugin) != null ? 1 : 0;
}
});