Interface CommandExceptionHandler<E extends CommandException>

Type Parameters:
E - The type of CommandException to handle
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CommandExceptionHandler<E extends CommandException>
Functional interface for handling CommandExceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    handle(CommandContext context, E exception)
    Handle a CommandException.
  • Method Details

    • handle

      boolean handle(CommandContext context, E exception)
      Handle a CommandException.
      Parameters:
      context - The context of the command execution
      exception - The exception thrown
      Returns:
      true if the exception was handled and onCommand should return true, false otherwise