From dfe92470e543d0d63c99044b1b70c73aa8a6a2a1 Mon Sep 17 00:00:00 2001 From: David Marby Date: Mon, 7 May 2012 19:33:02 +0200 Subject: [PATCH] Made it actually work, lawl --- src/main/java/net/citizensnpcs/Citizens.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/citizensnpcs/Citizens.java b/src/main/java/net/citizensnpcs/Citizens.java index 1507ddd48..0d0028d9c 100644 --- a/src/main/java/net/citizensnpcs/Citizens.java +++ b/src/main/java/net/citizensnpcs/Citizens.java @@ -19,6 +19,7 @@ import net.citizensnpcs.api.util.DatabaseStorage; import net.citizensnpcs.api.util.NBTStorage; import net.citizensnpcs.api.util.Storage; import net.citizensnpcs.api.util.YamlStorage; +import net.citizensnpcs.api.npc.character.Character; import net.citizensnpcs.command.CommandManager; import net.citizensnpcs.command.Injector; import net.citizensnpcs.command.command.AdminCommands; @@ -167,15 +168,14 @@ public class Citizens extends JavaPlugin { if (getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() { @Override public void run() { - setupNPCs(); + setupNPCs(); + // Run metrics "last" + startMetrics(); } }) == -1) { Messaging.log(Level.SEVERE, "Issue enabling plugin. Disabling."); getServer().getPluginManager().disablePlugin(this); } - - // Run metrics last - startMetrics(); } private void startMetrics() { @@ -191,8 +191,9 @@ public class Citizens extends JavaPlugin { } }); Metrics.Graph graph = metrics.createGraph("Character Type Usage"); - for(Object i : characterManager.getRegistered()){ - graph.addPlotter(new Metrics.Plotter(i.toString()) { + Messaging.log("Starting Metrics"); + for(Character character : characterManager.getRegistered()){ + graph.addPlotter(new Metrics.Plotter(character.getName()) { @Override public int getValue() { return 1;