From b1824f33e1f3127f91e8eacbc6019ed06c65df08 Mon Sep 17 00:00:00 2001 From: David Marby Date: Mon, 7 May 2012 21:44:54 +0200 Subject: [PATCH] Now shows amount of NPCs instead of amount of servers --- src/main/java/net/citizensnpcs/Citizens.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/citizensnpcs/Citizens.java b/src/main/java/net/citizensnpcs/Citizens.java index 79f6afafb..f2f8c93b7 100644 --- a/src/main/java/net/citizensnpcs/Citizens.java +++ b/src/main/java/net/citizensnpcs/Citizens.java @@ -183,6 +183,7 @@ public class Citizens extends JavaPlugin { @Override public void run() { try { + Messaging.log("Starting Metrics"); Metrics metrics = new Metrics(Citizens.this); metrics.addCustomData(new Metrics.Plotter("Total NPCs") { @Override @@ -191,12 +192,11 @@ public class Citizens extends JavaPlugin { } }); Metrics.Graph graph = metrics.createGraph("Character Type Usage"); - Messaging.log("Starting Metrics"); - for(Character character : characterManager.getRegistered()){ + for(final Character character : characterManager.getRegistered()){ graph.addPlotter(new Metrics.Plotter(StringHelper.capitalize(character.getName())) { @Override public int getValue() { - return 1; + return npcManager.getNPCs(character.getClass()).size(); } }); }