Package top.focess.qq.api.command
Class Command.Executor
- java.lang.Object
-
- top.focess.qq.api.command.Command.Executor
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Command.ExecutoraddCommandResultExecutor(CommandResult result, CommandResultExecutor executor)Set the executor of the special CommandResult after executing this ExecutorCommandgetCommand()Get the command this Executor belongs toCommand.ExecutoroverrideExecutorPermission(java.util.function.Predicate<CommandSender> executorPermission)Set the executor permission check for this Executor When execute this Executor, it will only check the executorPermissionCommand.ExecutorremoveExecutorPermission()Remove the executor permission check for this ExecutorCommand.ExecutorsetExecutorPermission(java.util.function.Predicate<CommandSender> executorPermission)Set the executor permission check for this Executor When execute this Executor, it will checkCommand.executorPermissionand the executorPermissionCommand.ExecutorsetPermission(CommandPermission permission)Set the executor Permission (Only if the CommandSender has the command that this executor belongs to and this executor's permissions, this executor runs)
-
-
-
Method Detail
-
setPermission
@NotNull public Command.Executor setPermission(@NotNull CommandPermission permission)
Set the executor Permission (Only if the CommandSender has the command that this executor belongs to and this executor's permissions, this executor runs)- Parameters:
permission- the executor Mirai Permission- Returns:
- the Executor itself
-
addCommandResultExecutor
@NotNull public Command.Executor addCommandResultExecutor(@NotNull CommandResult result, @NotNull CommandResultExecutor executor)
Set the executor of the special CommandResult after executing this Executor- Parameters:
result- the target CommandResultexecutor- the executor of the special CommandResult- Returns:
- the Executor itself
-
setExecutorPermission
@NotNull public Command.Executor setExecutorPermission(@NotNull java.util.function.Predicate<CommandSender> executorPermission)
Set the executor permission check for this Executor When execute this Executor, it will checkCommand.executorPermissionand the executorPermission- Parameters:
executorPermission- the executor permission check for this Executor- Returns:
- the Executor self
-
removeExecutorPermission
@NotNull public Command.Executor removeExecutorPermission()
Remove the executor permission check for this Executor- Returns:
- the Executor self
-
overrideExecutorPermission
@NotNull public Command.Executor overrideExecutorPermission(@NotNull java.util.function.Predicate<CommandSender> executorPermission)
Set the executor permission check for this Executor When execute this Executor, it will only check the executorPermission- Parameters:
executorPermission- the executor permission check for this Executor- Returns:
- the Executor self
-
getCommand
public Command getCommand()
Get the command this Executor belongs to- Returns:
- the command this Executor belongs to
-
-