public abstract class SelectorCommandElement extends PatternMatchingCommandElement
Selector
.Modifier | Constructor and Description |
---|---|
protected |
SelectorCommandElement(Text key) |
Modifier and Type | Method and Description |
---|---|
List<String> |
complete(CommandSource src,
CommandArgs args,
CommandContext context)
Fetch completions for command arguments.
|
protected Object |
parseValue(CommandSource source,
CommandArgs args)
Attempt to extract a value for this element from the given arguments.
|
getChoices, getExactMatch, getValue
getKey, getUntranslatedKey, getUsage, parse
@Nullable protected Object parseValue(CommandSource source, CommandArgs args) throws ArgumentParseException
CommandElement
CommandSource
in any way.parseValue
in class PatternMatchingCommandElement
source
- The source to parse forargs
- the argumentsArgumentParseException
- if unable to extract a valuepublic List<String> complete(CommandSource src, CommandArgs args, CommandContext context)
CommandElement
complete
in class PatternMatchingCommandElement
src
- The source requesting tab completionsargs
- The arguments currently providedcontext
- The context to store state in