25
25
package org .spongepowered .api .command .manager ;
26
26
27
27
import org .spongepowered .api .command .Command ;
28
+ import org .spongepowered .api .command .CommandCause ;
28
29
import org .spongepowered .api .command .CommandResult ;
29
30
import org .spongepowered .api .command .exception .CommandException ;
30
31
import org .spongepowered .api .command .registrar .CommandRegistrar ;
37
38
import java .util .Collection ;
38
39
import java .util .List ;
39
40
import java .util .Optional ;
41
+ import java .util .function .Predicate ;
40
42
41
43
/**
42
44
* Registers and dispatches commands
@@ -137,6 +139,8 @@ public interface CommandManager {
137
139
* @param container The {@link PluginContainer} to register the command for
138
140
* @param commandTree The {@link CommandTreeBuilder} that represents this command
139
141
* structure
142
+ * @param requirement What a {@link CommandCause} needs to fulfil in order for this
143
+ * command to be executed.
140
144
* @param primaryAlias The first command alias to register
141
145
* @param secondaryAliases Secondary aliases to register, if any
142
146
* @return The {@link CommandMapping} containing the command mapping
@@ -147,6 +151,7 @@ public interface CommandManager {
147
151
CommandMapping registerAlias (CommandRegistrar registrar ,
148
152
PluginContainer container ,
149
153
CommandTreeBuilder .Basic commandTree ,
154
+ Predicate <CommandCause > requirement ,
150
155
String primaryAlias ,
151
156
String ... secondaryAliases )
152
157
throws CommandFailedRegistrationException ;
0 commit comments