Class NoSuchCommandException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class NoSuchCommandException
    extends CommandParseException
    Exception thrown when a command sender tries to execute a command that doesn't exist
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NoSuchCommandException​(@NonNull java.lang.Object commandSender, @NonNull java.util.List<CommandArgument<?,​?>> currentChain, @NonNull java.lang.String command)
      Construct a no such command exception
    • Method Summary

      Modifier and Type Method Description
      java.lang.Throwable fillInStackTrace()  
      java.lang.String getMessage()  
      @NonNull java.lang.String getSuppliedCommand()
      Get the supplied command
      java.lang.Throwable initCause​(java.lang.Throwable cause)  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NoSuchCommandException

        public NoSuchCommandException​(@NonNull java.lang.Object commandSender,
                                      @NonNull java.util.List<CommandArgument<?,​?>> currentChain,
                                      @NonNull java.lang.String command)
        Construct a no such command exception
        Parameters:
        commandSender - Sender who executed the command
        currentChain - Chain leading up to the exception
        command - Entered command (following the command chain)
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • getSuppliedCommand

        public @NonNull java.lang.String getSuppliedCommand()
        Get the supplied command
        Returns:
        Supplied command
      • fillInStackTrace

        public java.lang.Throwable fillInStackTrace()
        Overrides:
        fillInStackTrace in class java.lang.Throwable
      • initCause

        public java.lang.Throwable initCause​(java.lang.Throwable cause)
        Overrides:
        initCause in class java.lang.Throwable