Update ReadMe.md

Fix /quake help/? command completion
This commit is contained in:
2021-05-05 00:37:06 +02:00
parent dc4f3244df
commit f491c12e00
2 changed files with 15 additions and 20 deletions

View File

@@ -101,7 +101,7 @@ public class MyCommandExecutor implements CommandExecutor {
}
public List<String> getCompletionList(Player player, String[] args) {
List<String> list = null;
List<String> list;
if( args.length <= 1) {
list = _commands.keySet().stream().collect(Collectors.toList());
@@ -112,6 +112,9 @@ public class MyCommandExecutor implements CommandExecutor {
if(_commands.containsKey(args[0])) {
list = _commands.get(args[0]).getCompletionList(player, args);
}
else {
list = new ArrayList();
}
}
return list;