Skip to content

Commit

Permalink
Update of lang + graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Apr 3, 2014
1 parent ef0193a commit 9be6aaf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"));
}

Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/EN_lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 9be6aaf

Please sign in to comment.