diff --git a/common/src/main/java/revxrsal/commands/core/SenderContextResolverFactory.java b/common/src/main/java/revxrsal/commands/core/SenderContextResolverFactory.java index 16747db0..bac7fa50 100644 --- a/common/src/main/java/revxrsal/commands/core/SenderContextResolverFactory.java +++ b/common/src/main/java/revxrsal/commands/core/SenderContextResolverFactory.java @@ -39,7 +39,7 @@ public SenderContextResolverFactory(List resolvers) { @Override public @Nullable ContextResolver create(@NotNull CommandParameter parameter) { if (parameter.getMethodIndex() != 0) return null; - if (parameter.hasAnnotation(Default.class) || parameter.hasAnnotation(NotSender.class)) return null; + if (parameter.isOptional() || parameter.hasAnnotation(NotSender.class)) return null; for (SenderResolver resolver : resolvers) { if (resolver.isCustomType(parameter.getType())) { return context -> notNull(resolver.getSender(parameter.getType(), context.actor(), context.command()),