mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 19:54:43 +02:00
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user