CMDAPIArrayLength #41
@ -67,4 +67,8 @@ public class ArgumentCommand extends TestSWCommand {
|
||||
public void minAndMaxLengthArgument(String sender, @Length(min = 3, max = 3) @StaticValue({"wo", "world"}) String arg) {
|
||||
throw new ExecutionIdentifier("RunLengthArgument with String");
|
||||
}
|
||||
|
||||
public void arrayLengthArgument(String sender, @ArrayLength(max = 3) @StaticValue({"one", "two", "three"}) String... args) {
|
||||
throw new ExecutionIdentifier("RunArrayLengthArgument with String");
|
||||
}
|
||||
}
|
||||
|
@ -121,5 +121,8 @@ public class ArgumentCommandTest {
|
||||
|
||||
strings = cmd.tabComplete("test", "", new String[]{"worl"});
|
||||
assertTabCompletes(strings, "wor", "worl");
|
||||
|
||||
strings = cmd.tabComplete("test", "", new String[]{"one", "two", "three", "one"});
|
||||
assertTabCompletes(strings);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren