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; }; }