mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 11:37:42 +01:00
Merge pull request #16 from DMarby/master
Now shows amount of NPCs instead of amount of servers.
This commit is contained in:
commit
b75748154f
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user