Class InvalidCommandSenderException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class InvalidCommandSenderException
    extends CommandParseException
    Exception thrown when an invalid command sender tries to execute a command
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidCommandSenderException​(@NonNull java.lang.Object commandSender, @NonNull java.lang.Class<?> requiredSender, @NonNull java.util.List<@NonNull CommandArgument<?,​?>> currentChain)
      Construct a new command parse exception
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getMessage()  
      @NonNull java.lang.Class<?> getRequiredSender()
      Get the required sender type
      • 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

      • InvalidCommandSenderException

        public InvalidCommandSenderException​(@NonNull java.lang.Object commandSender,
                                             @NonNull java.lang.Class<?> requiredSender,
                                             @NonNull java.util.List<@NonNull CommandArgument<?,​?>> currentChain)
        Construct a new command parse exception
        Parameters:
        commandSender - Sender who executed the command
        requiredSender - The sender type that is required
        currentChain - Chain leading up to the exception
    • Method Detail

      • getRequiredSender

        public @NonNull java.lang.Class<?> getRequiredSender()
        Get the required sender type
        Returns:
        Required sender type
      • getMessage

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