Skip to content

Commit 70ba461

Browse files
authored
Add List<String> register method to SCTabCompletion
1 parent ff5c09e commit 70ba461

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/stemcraft/util/SCTabCompletion.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ public static void register(String name, Supplier<List<String>> method) {
1616
completions.put(name.toLowerCase(), method);
1717
}
1818

19+
20+
/**
21+
* Registers a new completions method.
22+
*
23+
* @param name The name of the variable (without braces).
24+
* @param args The list of strings to display.
25+
*/
26+
public static void register(String name, List<String> args) {
27+
register(name, () -> args);
28+
}
29+
1930
/**
2031
* Registers a new completions method.
2132
*

0 commit comments

Comments
 (0)