Interface CommandPredicate<C>

All Superinterfaces:
Predicate<Command<C>>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @API(status=STABLE) public interface CommandPredicate<C> extends Predicate<Command<C>>
  • Method Summary

    Modifier and Type
    Method
    Description
    static <C> @NonNull CommandPredicate<C>
    Returns a new predicate which accepts all commands.
    boolean
    test(@NonNull Command<C> command)
    Returns true if the command should be kept and false if the command should be filtered out.

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Method Details

    • acceptAll

      static <C> @NonNull CommandPredicate<C> acceptAll()
      Returns a new predicate which accepts all commands.
      Type Parameters:
      C - the command sender type
      Returns:
      the filter
    • test

      boolean test(@NonNull Command<C> command)
      Returns true if the command should be kept and false if the command should be filtered out.
      Specified by:
      test in interface Predicate<C>
      Parameters:
      command - the command to test
      Returns:
      whether to keep the command