View Javadoc
1   package dev.sympho.modular_commands.api.command.result;
2   
3   import dev.sympho.modular_commands.api.command.parameter.Parameter;
4   
5   /**
6    * Failure result due to a provided argument being invalid.
7    *
8    * @param parameter The corresponding parameter.
9    * @param error The error message.
10   * @version 1.0
11   * @since 1.0
12   */
13  public record CommandFailureArgumentInvalid( Parameter<?> parameter, String error )
14          implements CommandFailureArgument {
15  
16      @Override
17      public String message() {
18  
19          return "%s: %s".formatted( parameter.name(), error );
20  
21      }
22      
23  }