MCCommandContextBuilder
导入相关包
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.MCCommandContextBuilder;
Casters
方法
build
Return Type: MCCommandContext
MCCommandContextBuilder.build(input as string) as MCCommandContext
参数 | 类型 | 描述 |
---|
input(输入) | string | No Description Provided |
copy #复制
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.copy() as MCCommandContextBuilder
myMCCommandContextBuilder.copy();
equals #等于
Return Type: boolean
MCCommandContextBuilder.equals(o as Object) as boolean
参数 | 类型 | 描述 |
---|
o | Object | No Description Provided |
查找建议内容
Return Type: MCSuggestionContext
MCCommandContextBuilder.findSuggestionContext(cursor as int) as MCSuggestionContext
参数 | 类型 | 描述 |
---|
cursor | int | No Description Provided |
获取参数
Return Type: MCParsedArgument[string]
MCCommandContextBuilder.getArguments() as MCParsedArgument[string]
myMCCommandContextBuilder.getArguments();
getChild
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.getChild() as MCCommandContextBuilder
myMCCommandContextBuilder.getChild();
getCommand
Return Type: MCCommand
MCCommandContextBuilder.getCommand() as MCCommand
myMCCommandContextBuilder.getCommand();
获取调度器
Return Type: MCCommandDispatcher
MCCommandContextBuilder.getDispatcher() as MCCommandDispatcher
myMCCommandContextBuilder.getDispatcher();
getLastChild
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.getLastChild() as MCCommandContextBuilder
myMCCommandContextBuilder.getLastChild();
getNodes
Return Type: stdlib.List<MCParsedCommandNode>
MCCommandContextBuilder.getNodes() as stdlib.List<MCParsedCommandNode>
myMCCommandContextBuilder.getNodes();
getRange
Return Type: MCStringRange
MCCommandContextBuilder.getRange() as MCStringRange
myMCCommandContextBuilder.getRange();
getRootNode
Return Type: MCCommandNode
MCCommandContextBuilder.getRootNode() as MCCommandNode
myMCCommandContextBuilder.getRootNode();
getSource
Return Type: MCCommandSource
MCCommandContextBuilder.getSource() as MCCommandSource
myMCCommandContextBuilder.getSource();
hashCode
Return Type: int
MCCommandContextBuilder.hashCode() as int
myMCCommandContextBuilder.hashCode();
toString
Return Type: string
MCCommandContextBuilder.toString() as string
myMCCommandContextBuilder.toString();
有参数
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.withArgument(name as string, argument as MCParsedArgument) as MCCommandContextBuilder
参数 | 类型 | 描述 |
---|
name | string | No Description Provided |
参数 | MCParsedArgument | No Description Provided |
与子节点
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.withChild(child as MCCommandContextBuilder) as MCCommandContextBuilder
使用命令
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.withCommand(command as MCCommand) as MCCommandContextBuilder
参数 | 类型 | 描述 |
---|
command | MC命令 | No Description Provided |
withNode
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.withNode(node as MCCommandNode, range as MCStringRange) as MCCommandContextBuilder
与源代码
Return Type: MCCommandContextBuilder
MCCommandContextBuilder.withSource(source as MCCommandSource) as MCCommandContextBuilder
参数 | 类型 | 描述 |
---|
来源 | MC命令源 | No Description Provided |
运算符
EQUALS
myMCCommandContextBuilder == o 为对象