MCCommandDispatcher
导入相关包
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.commands.custom.MCCommandDispatcher;
Casters
方法
equals #等于
Return Type: boolean
MCCommandDispatcher.equals(o as Object) as boolean
参数 | 类型 | 描述 |
---|
o | Object | No Description Provided |
执行
Return Type: int
MCCommandDispatcher.execute(parse as MCParseResults) as int
Return Type: int
MCCommandDispatcher.execute(input as string, source as MCCommandSource) as int
参数 | 类型 | 描述 |
---|
input(输入) | string | No Description Provided |
来源 | MC命令源 | No Description Provided |
查找模糊性
Return Type: void
MCCommandDispatcher.findAmbiguities(consumer as MCAmbiguityConsumer) as void
查找节点
Return Type: MCCommandNode
MCCommandDispatcher.findNode(path as Collection<string>) as MCCommandNode
参数 | 类型 | 描述 |
---|
path | Collection<string> | No Description Provided |
getAllUsage
Return Type: string[]
MCCommandDispatcher.getAllUsage(node as MCCommandNode, source as MCCommandSource, restricted as boolean) as string[]
参数 | 类型 | 描述 |
---|
节点 | MCCommand节点 | No Description Provided |
来源 | MC命令源 | No Description Provided |
restricted | boolean | No Description Provided |
getCompltion建议
Return Type: MCSuggestions
MCCommandDispatcher.getCompletionSuggestions(parse as MCParseResults) as MCSuggestions
Return Type: MCSuggestions
MCCommandDispatcher.getCompletionSuggestions(parse as MCParseResults, cursor as int) as MCSuggestions
参数 | 类型 | 描述 |
---|
parse | MCParseResults | No Description Provided |
cursor | int | No Description Provided |
getPath
Return Type: Collection<string>
MCCommandDispatcher.getPath(target as MCCommandNode) as Collection<string>
getRoot
Return Type: MCRootCommandNode
MCCommandDispatcher.getRoot() as MCRootCommandNode
myMCCommandDispatcher.getRoot();
getSmartUsage
Return Type: string[MCCommandNode]
MCCommandDispatcher.getSmartUsage(node as MCCommandNode, source as MCCommandSource) as string[MCCommandNode]
hashCode
Return Type: int
MCCommandDispatcher.hashCode() as int
myMCCommandDispatcher.hashCode();
parse
Return Type: MCParseResults
MCCommandDispatcher.parse(command as string, source as MCCommandSource) as MCParseResults
参数 | 类型 | 描述 |
---|
command | string | No Description Provided |
来源 | MC命令源 | No Description Provided |
注册
Return Type: MCLiteralCommandNode
MCCommandDispatcher.register(command as MCLiteralArgumentBuilder) as MCLiteralCommandNode
用户设置
Return Type: void
MCCommandDispatcher.setConsumer(consumer as MCResultConsumer) as void
toString
Return Type: string
MCCommandDispatcher.toString() as string
myMCCommandDispatcher.toString();
运算符
EQUALS
myMCCommandDispatcher == o as Object