Class InvalidSyntaxException

  • All Implemented Interfaces:
    java.io.Serializable

    public class InvalidSyntaxException
    extends CommandParseException
    Exception sent when a command sender inputs invalid command syntax
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidSyntaxException​(@NonNull java.lang.String correctSyntax, @NonNull java.lang.Object commandSender, @NonNull java.util.List<@NonNull CommandArgument<?,​?>> currentChain)
      Create a new invalid syntax exception instance
    • Method Summary

      Modifier and Type Method Description
      @NonNull java.lang.String getCorrectSyntax()
      Get the correct syntax of the command
      java.lang.String getMessage()  
      • Methods inherited from class java.lang.Throwable

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

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

      • InvalidSyntaxException

        public InvalidSyntaxException​(@NonNull java.lang.String correctSyntax,
                                      @NonNull java.lang.Object commandSender,
                                      @NonNull java.util.List<@NonNull CommandArgument<?,​?>> currentChain)
        Create a new invalid syntax exception instance
        Parameters:
        correctSyntax - Expected syntax
        commandSender - Sender that sent the command
        currentChain - Chain leading up to issue
    • Method Detail

      • getCorrectSyntax

        public @NonNull java.lang.String getCorrectSyntax()
        Get the correct syntax of the command
        Returns:
        Correct command syntax
      • getMessage

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