Skip to content

Commit 2d739c4

Browse files
committed
Added CompleterHelper#empty method
1 parent faf3ec3 commit 2d739c4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/java/me/despical/commandframework/CompleterHelper.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ public List<String> playerNames() {
6565
.toList();
6666
}
6767

68+
/**
69+
* Returns an empty, immutable list of strings.
70+
* <p>
71+
* This method is commonly used to terminate tab completion suggestions,
72+
* indicating that no matches or further arguments are available for the
73+
* current context.
74+
*
75+
* @return An empty, immutable list. Never returns null.
76+
*/
77+
@NotNull
78+
@Contract(pure = true)
79+
public List<String> empty() {
80+
return List.of();
81+
}
82+
6883
/**
6984
* Filters a collection of strings based on the argument at the specified index.
7085
* <p>

0 commit comments

Comments
 (0)