Skip to content

Commit 6cac60f

Browse files
simplify Command::checkArgumentCount
1 parent e641738 commit 6cac60f

File tree

1 file changed

+1
-2
lines changed
  • enigma-cli/src/main/java/org/quiltmc/enigma/command

1 file changed

+1
-2
lines changed

enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ private static void appendArguments(StringBuilder builder, List<Argument> argume
7878
* @return {@code true} if the argument count is valid, {@code false} otherwise
7979
*/
8080
public boolean checkArgumentCount(int length) {
81-
// valid if length is equal to the amount of required arguments or between required argument count and total argument count
82-
return length == this.requiredArguments.size() || length > this.requiredArguments.size() && length <= this.totalArgumentCount;
81+
return length >= this.requiredArguments.size() && length <= this.totalArgumentCount;
8382
}
8483

8584
/**

0 commit comments

Comments
 (0)