ArgumentMismatchEvent - S3nS3IW00/JCommands GitHub Wiki
This event gets triggered when then input was invalid for the argument. For example the pattern does not match the user input.
It contains the following information in addition to the base event:
- the argument for which the input was invalid
Register event
This event belongs to argument, and it can be registered with Argument#setOnMismatch(ArgumentMismatchEventListener)
with an ArgumentMismatchEventListener
as parameter.
This can be done by the following way:
argument.setOnMismatch(event -> {
//...
});