public class TabInfo extends Object
CommandNode.tabComplete(CommandSender, String...)
Modifier and Type | Field and Description |
---|---|
static List<String> |
BLANK_TAB_COMPLETE
Represents a blank
List for returning no input from CommandNode.tabComplete(CommandSender, String...) |
Constructor and Description |
---|
TabInfo() |
Modifier and Type | Method and Description |
---|---|
List<String> |
apply(CommandSender sender,
String... args)
Applies this
TabInfo to a series of command arguments. |
List<String> |
apply(String... args)
|
void |
map(int argCount,
BiFunction<CommandSender,String,? extends List<String>> defaults)
Maps an argument count to a
BiFunction that accepts the
CommandSender who tabbed, the relevant argument being parsed, or
null if there is no argument to parse, and returns a
List<String> of the results. |
void |
map(int argCount,
Function<String,? extends List<String>> defaults)
Maps an argument count to a
Function that accepts the relevant
argument being parsed, or null if there is no argument to parse,
and returns a List<String> of the results |
void |
map(int argCount,
List<String> defaults)
Maps an argument count to a specific list of default argument values.
|
void |
map(int argCount,
String... defaults)
Maps an argument count to a series of default argument values.
|
void |
map(int argCount,
Supplier<? extends List<String>> defaults)
Maps an argument count to a
Supplier for a
List<String> |
static Supplier<List<String>> |
onlinePlayers()
|
static Supplier<List<String>> |
onlinePlayers(Predicate<? super Player> filter)
|
public static final List<String> BLANK_TAB_COMPLETE
List
for returning no input from CommandNode.tabComplete(CommandSender, String...)
public void map(int argCount, String... defaults)
CommandNode
itself) should be mapped at argCount 0
argCount
- The number of arguments for these defaultsdefaults
- The defaults to setpublic void map(int argCount, List<String> defaults)
CommandNode
itself) should be mapped at argCount 0
argCount
- The number of arguments for these defaultsdefaults
- The defaults to setpublic void map(int argCount, Supplier<? extends List<String>> defaults)
Supplier
for a
List<String>
public void map(int argCount, Function<String,? extends List<String>> defaults)
Function
that accepts the relevant
argument being parsed, or null
if there is no argument to parse,
and returns a List<String>
of the resultspublic void map(int argCount, BiFunction<CommandSender,String,? extends List<String>> defaults)
BiFunction
that accepts the
CommandSender
who tabbed, the relevant argument being parsed, or
null
if there is no argument to parse, and returns a
List<String>
of the results.argCount
- The number of arguments for these defaultsdefaults
- A BiFunction
that accepts the sender who tabbed,
the relevant argument being tabbed (or null), and returns
a List
of possible string arguments to fill withpublic List<String> apply(String... args)
this.apply(null, args)
TabInfo
to a series of command arguments. If the
final argument is incomplete, then any default arguments which do not
start with the specified incomplete argument will be removed from the
possible resultsargs
- The arguments being testedapply(CommandSender, String...)
public List<String> apply(CommandSender sender, String... args)
TabInfo
to a series of command arguments. If the
final argument is incomplete, then any default arguments which do not
start with the specified incomplete argument will be removed from the
possible resultssender
- The CommandSender
who is tabbingargs
- The arguments being testedCopyright © 2017. All rights reserved.