close #659
close #662
close #665
close #638
This commit is contained in:
Jesse Boyd
2015-10-10 18:07:26 +11:00
parent 8e874ddeb0
commit 50c6753bf4
13 changed files with 90 additions and 114 deletions

View File

@ -50,7 +50,7 @@ public class Alias extends SetCommand {
MainUtil.sendMessage(plr, C.ALIAS_TOO_LONG);
return false;
}
if (!StringMan.isAlphanumericUnd(alias)) {
if (alias.contains(" ") || !StringMan.isAsciiPrintable(alias)) {
C.NOT_VALID_VALUE.send(plr);
return false;
}

View File

@ -164,28 +164,12 @@ public class list extends SubCommand {
return false;
}
plots = new ArrayList<>();
String match;
if (args.length == 2) {
match = args[1];
} else {
match = null;
}
for (final Plot plot : PS.get().getPlots()) {
final Flag flag = plot.getFlags().get("done");
if (flag == null) {
continue;
}
if (match != null) {
try {
if (flag.getValueString().matches(match)) {
plots.add(plot);
}
} catch (final Exception e) {
break;
}
} else {
plots.add(plot);
}
plots.add(plot);
}
Collections.sort(plots, new Comparator<Plot>() {
@Override