Work towards making CommandMeta typesafe (#173)

Co-authored-by: Alexander Söderberg <sauilitired@gmail.com>
This commit is contained in:
zml 2020-12-16 03:07:22 -08:00 committed by Alexander Söderberg
parent ab366be24d
commit 1e91273e0e
33 changed files with 450 additions and 64 deletions

View file

@ -307,7 +307,7 @@ public final class AnnotationParser<C> {
final SimpleCommandMeta.Builder metaBuilder = SimpleCommandMeta.builder()
.with(this.metaFactory.apply(method));
if (methodOrClassHasAnnotation(method, Confirmation.class)) {
metaBuilder.with(CommandConfirmationManager.CONFIRMATION_REQUIRED_META, "true");
metaBuilder.with(CommandConfirmationManager.META_CONFIRMATION_REQUIRED, true);
}
@SuppressWarnings("rawtypes")