MCPcopy Create free account
hub / github.com/demoth/jake2 / CompleteCommand

Method CompleteCommand

qcommon/src/main/java/jake2/qcommon/exec/Cmd.java:333–345  ·  view source on GitHub ↗

Find commands or aliases by prefix

(String prefix)

Source from the content-addressed store, hash-verified

331 * Find commands or aliases by prefix
332 */
333 public static List<String> CompleteCommand(String prefix) {
334 List<String> cmds = new ArrayList<>();
335
336 for (cmd_function_t cmd : cmd_functions.values())
337 if (cmd.name.startsWith(prefix))
338 cmds.add(cmd.name);
339
340 for (cmdalias_t a : cmd_alias.values())
341 if (a.getName().startsWith(prefix))
342 cmds.add(a.getName());
343
344 return cmds;
345 }
346
347 public static void ExecuteFunction(String name, String... args) {
348 if (cmd_functions.containsKey(name)) {

Callers 1

CompleteCommandMethod · 0.95

Calls 2

getNameMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected