diff options
Diffstat (limited to 'azalea-brigadier/src')
| -rw-r--r-- | azalea-brigadier/src/arguments/argument_type.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/azalea-brigadier/src/arguments/argument_type.rs b/azalea-brigadier/src/arguments/argument_type.rs index e69de29b..4dc97ee0 100644 --- a/azalea-brigadier/src/arguments/argument_type.rs +++ b/azalea-brigadier/src/arguments/argument_type.rs @@ -0,0 +1,20 @@ +pub trait ArgumentType<T> { + // T parse(StringReader reader) throws CommandSyntaxException; + + // default <S> CompletableFuture<Suggestions> listSuggestions(final CommandContext<S> context, final SuggestionsBuilder builder) { + // return Suggestions.empty(); + // } + + // default Collection<String> getExamples() { + // return Collections.emptyList(); + // } + + fn parse(reader: &mut StringReader) -> Result<T, CommandSyntaxError>; + + fn list_suggestions<S>( + context: &CommandContext<S>, + builder: &mut SuggestionsBuilder, + ) -> Result<Suggestions, CommandSyntaxError>; + + fn get_examples() -> Vec<String>; +} |
