Clean up descriptions
This commit is contained in:
parent
b0cd22886d
commit
3b2ccdca14
10 changed files with 281 additions and 37 deletions
|
|
@ -80,7 +80,8 @@ public final class AnnotationParser<C> {
|
|||
this.manager = manager;
|
||||
this.metaFactory = new MetaFactory(this, metaMapper);
|
||||
this.annotationMappers = Maps.newHashMap();
|
||||
this.registerAnnotationMapper(Description.class, d -> ParserParameters.single(StandardParameters.DESCRIPTION, d.value()));
|
||||
this.registerAnnotationMapper(CommandDescription.class, d ->
|
||||
ParserParameters.single(StandardParameters.DESCRIPTION, d.value()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -181,7 +182,7 @@ public final class AnnotationParser<C> {
|
|||
}
|
||||
|
||||
final String description = argumentDescriptions.getOrDefault(argument, "");
|
||||
builder = builder.argument(argument, description);
|
||||
builder = builder.argument(argument, com.intellectualsites.commands.Description.of(description));
|
||||
}
|
||||
}
|
||||
/* Try to find the command sender type */
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import java.lang.annotation.Target;
|
|||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface Description {
|
||||
public @interface CommandDescription {
|
||||
|
||||
/**
|
||||
* Command description
|
||||
Loading…
Add table
Add a link
Reference in a new issue