| 限定符和类型 | 方法和说明 |
|---|---|
Command |
getCommand()
Get the command this Executor belongs to
|
@NotNull 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
|
@NotNull Command.Executor |
removeExecutorPermission()
Remove the executor permission check for this Executor
|
@NotNull Command.Executor |
setCommandResultExecutors(@NotNull CommandResult result,
@NotNull CommandResultExecutor executor)
Set the executor of the special CommandResult after executing this Executor
|
@NotNull Command.Executor |
setDataConverters(DataConverter<?>... dataConverters)
Set the DataConverters for the arguments.
|
@NotNull Command.Executor |
setExecutorPermission(@NotNull java.util.function.Predicate<CommandSender> executorPermission)
Set the executor permission check for this Executor
When execute this Executor, it will check
Command.executorPermission and the executorPermission |
@NotNull Command.Executor |
setPermission(@NotNull CommandPermission permission)
Set the executor Mirai Permission
(Only if the CommandSender has the command that this executor belongs to and this executor's permissions, this executor runs)
|
@NotNull Command.Executor |
setPermission(@NotNull net.mamoe.mirai.contact.MemberPermission permission)
已过时。
|
@NotNull Command.Executor |
setUseDefaultConverter(boolean flag)
Set whether force use the
DataConverter.DEFAULT_DATA_CONVERTER or not. |
@NotNull @Deprecated public @NotNull Command.Executor setPermission(@NotNull @NotNull net.mamoe.mirai.contact.MemberPermission permission)
permission - the executor Mirai Permission@NotNull public @NotNull Command.Executor setPermission(@NotNull @NotNull CommandPermission permission)
permission - the executor Mirai Permission@NotNull public @NotNull Command.Executor setCommandResultExecutors(@NotNull @NotNull CommandResult result, @NotNull @NotNull CommandResultExecutor executor)
result - the target CommandResultexecutor - the executor of the special CommandResult@NotNull public @NotNull Command.Executor setDataConverters(@NotNull DataConverter<?>... dataConverters)
setUseDefaultConverter(boolean) is set false, this method will influence the DataCollection parser.dataConverters - used to parser arguments this executor needs.setUseDefaultConverter(boolean)@NotNull public @NotNull Command.Executor setUseDefaultConverter(boolean flag)
DataConverter.DEFAULT_DATA_CONVERTER or not.
If this is set true, the influence by setDataConverters(DataConverter[]) is ignored.flag - true force use the DataConverter.DEFAULT_DATA_CONVERTER, false ignore itsetDataConverters(DataConverter[])@NotNull public @NotNull Command.Executor setExecutorPermission(@NotNull @NotNull java.util.function.Predicate<CommandSender> executorPermission)
Command.executorPermission and the executorPermissionexecutorPermission - the executor permission check for this Executor@NotNull public @NotNull Command.Executor removeExecutorPermission()
@NotNull public @NotNull Command.Executor overrideExecutorPermission(@NotNull @NotNull java.util.function.Predicate<CommandSender> executorPermission)
executorPermission - the executor permission check for this Executorpublic Command getCommand()
Copyright © 2022. All rights reserved.