17
17
*/
18
18
public abstract class CommandLink <T > {
19
19
protected final Set <CommandNode <?>> children = new HashSet <>();
20
- protected final List <Require > requires = new ArrayList <>();
20
+ protected final List <Requirement > requires = new ArrayList <>();
21
21
22
22
protected Consumer <CommandContext > executor ;
23
23
24
24
/**
25
25
* Requires the context in which the command is executed in to pass the {@code requires} check
26
- * @param require A function that determines if a {@code CommandContext} can run the command
26
+ * @param requirement A function that determines if a {@code CommandContext} can run the command
27
27
* @return Itself, for chaining
28
28
*/
29
- public T requires (@ NotNull Require require ) {
30
- this .requires .add (require );
29
+ public T requires (@ NotNull Requirement requirement ) {
30
+ this .requires .add (requirement );
31
31
return getThis ();
32
32
}
33
33
34
34
/**
35
35
* Requires the sender to be a {@code Player}
36
- * @see #requires(Require )
36
+ * @see #requires(Requirement )
37
37
* @return Itself, for chaining
38
38
*/
39
39
public T requiresPlayer () {
@@ -42,7 +42,7 @@ public T requiresPlayer() {
42
42
43
43
/**
44
44
* Requires the sender to be an {@code Entity}
45
- * @see #requires(Require )
45
+ * @see #requires(Requirement )
46
46
* @return Itself, for chaining
47
47
*/
48
48
public T requiresEntity () {
@@ -92,5 +92,5 @@ public Consumer<CommandContext> getExecutor() {
92
92
* A function that defines a command requirement.
93
93
* This interface is basically a shorthand for {@code Function<CommandContext, Result<None, String>>}
94
94
*/
95
- public interface Require extends Function <CommandContext , Result <None , String >> { }
95
+ public interface Requirement extends Function <CommandContext , Result <None , String >> { }
96
96
}
0 commit comments