forked from LogBlock/LogBlock
Player name auto-completion does more harm than good, so don't do that
Fixes #388
This commit is contained in:
@ -585,11 +585,8 @@ public final class QueryParams implements Cloneable {
|
||||
if (playerName.contains("\"")) {
|
||||
players.add(playerName.replaceAll("[^a-zA-Z0-9_]", ""));
|
||||
} else {
|
||||
final List<Player> matches = logblock.getServer().matchPlayer(playerName);
|
||||
if (matches.size() > 1) {
|
||||
throw new IllegalArgumentException("Ambiguous playername '" + param + "'");
|
||||
}
|
||||
players.add(matches.size() == 1 ? matches.get(0).getName() : playerName.replaceAll("[^a-zA-Z0-9_]", ""));
|
||||
final Player matches = logblock.getServer().getPlayerExact(playerName);
|
||||
players.add(matches != null ? matches.getName() : playerName.replaceAll("[^a-zA-Z0-9_]", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user