Added Graph "Database Type" to Statistics Page

Statistics Page: http://mcstats.org/plugin/ShopChest
This commit is contained in:
Eric 2016-06-03 15:03:38 +02:00
parent 3ff0b4c556
commit ce2c812b27

View File

@ -113,6 +113,31 @@ public class ShopChest extends JavaPlugin {
}); });
Graph databaseType = metrics.createGraph("Database Type");
databaseType.addPlotter(new Plotter("SQLite") {
@Override
public int getValue() {
if (Config.database_type() == Database.DatabaseType.SQLite)
return 1;
return 0;
}
});
databaseType.addPlotter(new Plotter("MySQL") {
@Override
public int getValue() {
if (Config.database_type() == Database.DatabaseType.MySQL)
return 1;
return 0;
}
});
metrics.start(); metrics.start();
} catch (IOException e) { } catch (IOException e) {
logger.severe("Could not submit stats."); logger.severe("Could not submit stats.");