Skip to content

Commit cf1e100

Browse files
committed
Move isOptional call
1 parent 1b8fc38 commit cf1e100

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/main/java/org/spongepowered/api/command/parameter/Parameter.java

+15-7
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
import java.util.Collection;
6565
import java.util.List;
6666
import java.util.Map;
67+
import java.util.Set;
6768
import java.util.UUID;
6869
import java.util.function.Function;
6970
import java.util.function.Predicate;
@@ -769,6 +770,13 @@ static <T> Parameter.Value.Builder<T> literal(Class<T> returnType, T returnedVal
769770
*/
770771
Text getUsage(CommandCause cause);
771772

773+
/**
774+
* Gets whether this parameter is optional.
775+
*
776+
* @return true if optional, else false.
777+
*/
778+
boolean isOptional();
779+
772780
/**
773781
* A {@link Key}
774782
*
@@ -860,13 +868,6 @@ interface Value<T> extends Parameter {
860868
*/
861869
Predicate<CommandCause> getRequirement();
862870

863-
/**
864-
* Gets whether this parameter is optional.
865-
*
866-
* @return true if optional, else false.
867-
*/
868-
boolean isOptional();
869-
870871
/**
871872
* Builds a {@link Parameter} from constituent components.
872873
*/
@@ -1104,6 +1105,13 @@ interface Subcommand extends Parameter {
11041105
*/
11051106
Command getCommand();
11061107

1108+
/**
1109+
* The alias for the subcommand.
1110+
*
1111+
* @return The subcommand.
1112+
*/
1113+
Set<String> getAliases();
1114+
11071115
interface Builder extends ResettableBuilder<Subcommand, Builder> {
11081116

11091117
/**

0 commit comments

Comments
 (0)