mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-22 17:18:20 +01:00
Add Storage type plotters, update version to 2.0.6-SNAPSHOT
This commit is contained in:
parent
3a24dbd689
commit
c4cfd02b1a
4
pom.xml
4
pom.xml
@ -6,13 +6,13 @@
|
||||
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizens</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.6-SNAPSHOT</version>
|
||||
<name>Citizens</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<craftbukkit.version>LATEST</craftbukkit.version>
|
||||
<citizensapi.version>2.0.5</citizensapi.version>
|
||||
<citizensapi.version>2.0.6-SNAPSHOT</citizensapi.version>
|
||||
<vault.version>1.2.19-SNAPSHOT</vault.version>
|
||||
<powermock.version>1.4.12</powermock.version>
|
||||
<build.number>Unknown</build.number>
|
||||
|
@ -314,6 +314,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
});
|
||||
|
||||
traitFactory.addPlotters(metrics.createGraph("traits"));
|
||||
saves.addPlotters(metrics.createGraph("Storage type"));
|
||||
metrics.start();
|
||||
} catch (IOException e) {
|
||||
Messaging.logTr(Messages.METRICS_ERROR_NOTIFICATION, e.getMessage());
|
||||
|
@ -3,6 +3,8 @@ package net.citizensnpcs;
|
||||
import java.io.File;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import net.citizensnpcs.Metrics.Graph;
|
||||
import net.citizensnpcs.Metrics.Plotter;
|
||||
import net.citizensnpcs.Settings.Setting;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.api.npc.NPCRegistry;
|
||||
@ -96,4 +98,25 @@ public class NPCDataStore {
|
||||
return null;
|
||||
return new NPCDataStore(saves);
|
||||
}
|
||||
|
||||
public void addPlotters(Graph graph) {
|
||||
graph.addPlotter(new Plotter("Database") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return root instanceof DatabaseStorage ? 1 : 0;
|
||||
}
|
||||
});
|
||||
graph.addPlotter(new Plotter("YAML") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return root instanceof YamlStorage ? 1 : 0;
|
||||
}
|
||||
});
|
||||
graph.addPlotter(new Plotter("NBT") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return root instanceof NBTStorage ? 1 : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user