From ce2c812b279f69baeeb098bcccba237392685665 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 3 Jun 2016 15:03:38 +0200 Subject: [PATCH] Added Graph "Database Type" to Statistics Page Statistics Page: http://mcstats.org/plugin/ShopChest --- src/de/epiceric/shopchest/ShopChest.java | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/de/epiceric/shopchest/ShopChest.java b/src/de/epiceric/shopchest/ShopChest.java index 7b42aed..fedd3da 100644 --- a/src/de/epiceric/shopchest/ShopChest.java +++ b/src/de/epiceric/shopchest/ShopChest.java @@ -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(); } catch (IOException e) { logger.severe("Could not submit stats.");