From c4ed8948ad5bb2cb8414ee2d3408e52928237908 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 16 Jun 2022 23:08:05 +0200 Subject: [PATCH] Fix CommandPart Validator for varargs part --- src/de/steamwar/command/SWCommandUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/de/steamwar/command/SWCommandUtils.java b/src/de/steamwar/command/SWCommandUtils.java index d6164cb..cea1dd6 100644 --- a/src/de/steamwar/command/SWCommandUtils.java +++ b/src/de/steamwar/command/SWCommandUtils.java @@ -26,7 +26,6 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.util.*; -import java.util.function.BiConsumer; import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; @@ -189,7 +188,7 @@ public class SWCommandUtils { AbstractSWCommand.ErrorMessage errorMessage = parameter.getAnnotation(AbstractSWCommand.ErrorMessage.class); if (errorMessage != null) { return (AbstractValidator) (sender, value, messageSender) -> { - if (value == null) messageSender.accept(errorMessage.value(), new Object[0]); + if (value == null) messageSender.send(errorMessage.value(), new Object[0]); return value != null; }; }