diff --git a/src/main/java/com/carlgo11/simpleautomessage/language/Lang.java b/src/main/java/com/carlgo11/simpleautomessage/language/Lang.java index 00a8069..c3abbac 100644 --- a/src/main/java/com/carlgo11/simpleautomessage/language/Lang.java +++ b/src/main/java/com/carlgo11/simpleautomessage/language/Lang.java @@ -16,7 +16,7 @@ public enum Lang { UNKNOWN_CMD("unknown-command", "Error: Unknown command!"), NO_TIME("no-time", "No time string found!"), NO_TIME_SETUP("time-setup", "Time-setup: string found!"), - NO_MSG1("no-msg1", "Error: No msg1 found. Did you break the config?"), + NO_MSG1("no-msg1", "Error: No msg1 found. Did you forget to set one or is the config broken?"), ERROR("error", "Error acurred! Plugin disabeled!"), UPDATING("updating", "Updating %prefix%..."), UPDATED("updated", "Done. Restart the server to load the new patch."), diff --git a/src/main/java/com/carlgo11/simpleautomessage/metrics/CustomGraphs.java b/src/main/java/com/carlgo11/simpleautomessage/metrics/CustomGraphs.java index b1d8df5..9fea632 100644 --- a/src/main/java/com/carlgo11/simpleautomessage/metrics/CustomGraphs.java +++ b/src/main/java/com/carlgo11/simpleautomessage/metrics/CustomGraphs.java @@ -7,6 +7,7 @@ public class CustomGraphs { public static void graphs(Metrics metrics, Main Main) { // Custom Graphs. Sends data to mcstats.org try { + //Graph1 Metrics.Graph graph1 = metrics.createGraph("Messages"); //Sends data about how many msg strings the server has. int o = 0; @@ -25,19 +26,21 @@ public static void graphs(Metrics metrics, Main Main) //Graph3 Metrics.Graph graph3 = metrics.createGraph("language"); - if (Main.getConfig().getString("language").equalsIgnoreCase("EN") || Main.getConfig().getString("language").isEmpty()) { + String lang = Main.getConfig().getString("language"); + if (lang.equalsIgnoreCase("EN") || lang.isEmpty()) { graph3.addPlotter(new SimplePlotter("English")); - } - if (Main.getConfig().getString("language").equalsIgnoreCase("FR")) { + }else + if (lang.equalsIgnoreCase("FR")) { graph3.addPlotter(new SimplePlotter("French")); - } - if (Main.getConfig().getString("language").equalsIgnoreCase("NL")) { + }else + if (lang.equalsIgnoreCase("NL")) { graph3.addPlotter(new SimplePlotter("Dutch")); - } - if (Main.getConfig().getString("language").equalsIgnoreCase("SE")) { + }else + if (lang.equalsIgnoreCase("SE")) { graph3.addPlotter(new SimplePlotter("Swedish")); - } - if (!Main.getConfig().getString("language").equalsIgnoreCase("EN") && !Main.getConfig().getString("language").equalsIgnoreCase("FR") && !Main.getConfig().getString("language").equalsIgnoreCase("NL") && !Main.getConfig().getString("language").equalsIgnoreCase("SE")) { + }else if(lang.equalsIgnoreCase("RU")){ + graph3.addPlotter(new SimplePlotter("Russian")); + }else{ graph3.addPlotter(new SimplePlotter("Other")); } @@ -64,12 +67,16 @@ public static void graphs(Metrics metrics, Main Main) graph6.addPlotter(new SimplePlotter("none")); } } + + //Graph7 Metrics.Graph graph7 = metrics.createGraph("update-config"); if(!Main.getConfig().getBoolean("update-config")){ graph7.addPlotter(new SimplePlotter("enabled")); }else{ graph7.addPlotter(new SimplePlotter("disalbed")); } + + Main.debug("Sending metrics data..."); metrics.start(); } catch (Exception e) { diff --git a/src/main/resources/EN_lang.yml b/src/main/resources/EN_lang.yml index ecc68a8..04444e2 100644 --- a/src/main/resources/EN_lang.yml +++ b/src/main/resources/EN_lang.yml @@ -5,7 +5,7 @@ mcstats-error: 'Error Submitting stats!' bad-perms: "&cError: You don't have permission to use that command!" plugin-reloaded: '&aSimpleAutoMessage reloaded!' unknown-command: '&cError: Unknown command!' -no-msg1: 'Error: No msg1 found. Did you break the config?' +no-msg1: 'Error: No msg1 found. Did you forget to set one or is the config broken?' updating: 'Updating %prefix%...' updated: 'Done. Restart the server to load the new patch.' simplemsg-main: ' Shows the commands'