Package ch.njol.skript.Metrics

Examples of ch.njol.skript.Metrics.Plotter


       
        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;
            }
          });
View Full Code Here

TOP

Related Classes of ch.njol.skript.Metrics.Plotter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.