mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 09:00:28 +08:00
Fixed space returning every result and commented stuff
Analysis attempt commented Fixed search displaying everything with -p argument.
This commit is contained in:
parent
5756c21e5b
commit
9375797ca8
@ -71,9 +71,9 @@ public class SearchCommand extends SubCommand {
|
|||||||
|
|
||||||
//header
|
//header
|
||||||
sender.sendMessage(textColor + "-- [" + operatorColor + "PLAN - Search results: took " + DataFormatUtils.formatTimeAmountSinceDate(refreshDate, new Date()) + textColor + "] --");
|
sender.sendMessage(textColor + "-- [" + operatorColor + "PLAN - Search results: took " + DataFormatUtils.formatTimeAmountSinceDate(refreshDate, new Date()) + textColor + "] --");
|
||||||
|
sender.sendMessage(operatorColor + "Results for: " + Arrays.toString(args));
|
||||||
for (String playerName : dataLists.keySet()) {
|
for (String playerName : dataLists.keySet()) {
|
||||||
sender.sendMessage(textColor + "Results for: " + playerName);
|
sender.sendMessage(textColor + "Matching player: " + playerName);
|
||||||
for (String[] dataString : dataLists.get(playerName)) {
|
for (String[] dataString : dataLists.get(playerName)) {
|
||||||
sender.sendMessage("" + operatorColor + dataString[0].charAt(4) + dataString[0].toLowerCase().substring(5) + ": " + textColor + dataString[1]);
|
sender.sendMessage("" + operatorColor + dataString[0].charAt(4) + dataString[0].toLowerCase().substring(5) + ": " + textColor + dataString[1]);
|
||||||
}
|
}
|
||||||
|
@ -63,27 +63,27 @@ public class Analysis {
|
|||||||
timeKeys.addAll(Arrays.asList(timeValues));
|
timeKeys.addAll(Arrays.asList(timeValues));
|
||||||
|
|
||||||
// Attempt to determine if undefined data is usable
|
// Attempt to determine if undefined data is usable
|
||||||
List<String> unusedKeys = new ArrayList<>();
|
// List<String> unusedKeys = new ArrayList<>();
|
||||||
unusedKeys.addAll(playerDataLists.keySet());
|
// unusedKeys.addAll(playerDataLists.keySet());
|
||||||
unusedKeys.removeAll(numberKeys);
|
// unusedKeys.removeAll(numberKeys);
|
||||||
unusedKeys.removeAll(boolKeys);
|
// unusedKeys.removeAll(boolKeys);
|
||||||
unusedKeys.removeAll(timeKeys);
|
// unusedKeys.removeAll(timeKeys);
|
||||||
unusedKeys.removeAll(ignoreKeys);
|
// unusedKeys.removeAll(ignoreKeys);
|
||||||
for (String key : unusedKeys) {
|
// for (String key : unusedKeys) {
|
||||||
try {
|
// try {
|
||||||
Double.parseDouble(playerDataLists.get(key).get(0));
|
// Double.parseDouble(playerDataLists.get(key).get(0));
|
||||||
numberKeys.add(key);
|
// numberKeys.add(key);
|
||||||
continue;
|
// continue;
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
try {
|
// try {
|
||||||
Boolean.parseBoolean(playerDataLists.get(key).get(0));
|
// Boolean.parseBoolean(playerDataLists.get(key).get(0));
|
||||||
boolKeys.add(key);
|
// boolKeys.add(key);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
HashMap<String, String> averagesAndPercents = new HashMap<>();
|
HashMap<String, String> averagesAndPercents = new HashMap<>();
|
||||||
int errors = 0;
|
int errors = 0;
|
||||||
|
@ -168,11 +168,6 @@ public class DataFormatUtils {
|
|||||||
String[] returnArray = new String[args.length];
|
String[] returnArray = new String[args.length];
|
||||||
argloop:
|
argloop:
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
if (args[i].equals("-p")) {
|
|
||||||
args[0] = "";
|
|
||||||
returnArray[0] = "";
|
|
||||||
returnArray[i] = "";
|
|
||||||
}
|
|
||||||
for (String s : aac) {
|
for (String s : aac) {
|
||||||
if (args[i].toLowerCase().contains(s)) {
|
if (args[i].toLowerCase().contains(s)) {
|
||||||
returnArray[i] = "AAC";
|
returnArray[i] = "AAC";
|
||||||
@ -204,6 +199,10 @@ public class DataFormatUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
returnArray[i] = args[i];
|
returnArray[i] = args[i];
|
||||||
|
if (args[i].equals("-p")) {
|
||||||
|
returnArray[0] = args[0]+"_(Playername)";
|
||||||
|
returnArray[i] = "---";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return returnArray;
|
return returnArray;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user