mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +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
|
||||
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()) {
|
||||
sender.sendMessage(textColor + "Results for: " + playerName);
|
||||
sender.sendMessage(textColor + "Matching player: " + playerName);
|
||||
for (String[] dataString : dataLists.get(playerName)) {
|
||||
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));
|
||||
|
||||
// Attempt to determine if undefined data is usable
|
||||
List<String> unusedKeys = new ArrayList<>();
|
||||
unusedKeys.addAll(playerDataLists.keySet());
|
||||
unusedKeys.removeAll(numberKeys);
|
||||
unusedKeys.removeAll(boolKeys);
|
||||
unusedKeys.removeAll(timeKeys);
|
||||
unusedKeys.removeAll(ignoreKeys);
|
||||
for (String key : unusedKeys) {
|
||||
try {
|
||||
Double.parseDouble(playerDataLists.get(key).get(0));
|
||||
numberKeys.add(key);
|
||||
continue;
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
try {
|
||||
Boolean.parseBoolean(playerDataLists.get(key).get(0));
|
||||
boolKeys.add(key);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
// List<String> unusedKeys = new ArrayList<>();
|
||||
// unusedKeys.addAll(playerDataLists.keySet());
|
||||
// unusedKeys.removeAll(numberKeys);
|
||||
// unusedKeys.removeAll(boolKeys);
|
||||
// unusedKeys.removeAll(timeKeys);
|
||||
// unusedKeys.removeAll(ignoreKeys);
|
||||
// for (String key : unusedKeys) {
|
||||
// try {
|
||||
// Double.parseDouble(playerDataLists.get(key).get(0));
|
||||
// numberKeys.add(key);
|
||||
// continue;
|
||||
// } catch (Exception e) {
|
||||
//
|
||||
// }
|
||||
// try {
|
||||
// Boolean.parseBoolean(playerDataLists.get(key).get(0));
|
||||
// boolKeys.add(key);
|
||||
// } catch (Exception e) {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
HashMap<String, String> averagesAndPercents = new HashMap<>();
|
||||
int errors = 0;
|
||||
|
@ -168,11 +168,6 @@ public class DataFormatUtils {
|
||||
String[] returnArray = new String[args.length];
|
||||
argloop:
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (args[i].equals("-p")) {
|
||||
args[0] = "";
|
||||
returnArray[0] = "";
|
||||
returnArray[i] = "";
|
||||
}
|
||||
for (String s : aac) {
|
||||
if (args[i].toLowerCase().contains(s)) {
|
||||
returnArray[i] = "AAC";
|
||||
@ -204,6 +199,10 @@ public class DataFormatUtils {
|
||||
}
|
||||
}
|
||||
returnArray[i] = args[i];
|
||||
if (args[i].equals("-p")) {
|
||||
returnArray[0] = args[0]+"_(Playername)";
|
||||
returnArray[i] = "---";
|
||||
}
|
||||
}
|
||||
return returnArray;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user