MCCommand节点

导入相关包

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.

ZenScript
Copy
import crafttweaker.api.commands.custom.MCCommandNode;

Casters

结果类型是否隐藏
stringtrue

方法

addChild

Return Type: void

ZenScript
Copy
MCCommandNode.addChild(node as MCCommandNode) as void
参数类型描述
节点MCCommand节点No Description Provided

canUse

Return Type: boolean

ZenScript
Copy
MCCommandNode.canUse(source as MCCommandSource) as boolean
参数类型描述
来源MC命令源No Description Provided

createBuilder

Return Type: MCArgumentBuilder

ZenScript
Copy
MCCommandNode.createBuilder() as MCArgumentBuilder
myMCCommandNode.createBuilder();

equals #等于

Return Type: boolean

ZenScript
Copy
MCCommandNode.equals(o as Object) as boolean
参数类型描述
oObjectNo Description Provided

查找模糊性

Return Type: void

ZenScript
Copy
MCCommandNode.findAmbiguities(consumer as MCAmbiguityConsumer) as void
参数类型描述
消费者MCAmbiguityConsumerNo Description Provided

getChild

Return Type: MCCommandNode

ZenScript
Copy
MCCommandNode.getChild(name as string) as MCCommandNode
参数类型描述
namestringNo Description Provided

getChildren

Return Type: Collection<MCCommandNode>

ZenScript
Copy
MCCommandNode.getChildren() as Collection<MCCommandNode>
myMCCommandNode.getChildren();

getCommand

Return Type: MCCommand

ZenScript
Copy
MCCommandNode.getCommand() as MCCommand
myMCCommandNode.getCommand();

getExamples

Return Type: Collection<string>

ZenScript
Copy
MCCommandNode.getExamples() as Collection<string>
myMCCommandNode.getExamples();

getName

Return Type: string

ZenScript
Copy
MCCommandNode.getName() as string
myMCCommandNode.getName();

获取重定向

Return Type: MCCommandNode

ZenScript
Copy
MCCommandNode.getRedirect() as MCCommandNode
myMCCommandNode.getRedirect();

获取重定向修改器

Return Type: MCRedirectModifier

ZenScript
Copy
MCCommandNode.getRedirectModifier() as MCRedirectModifier
myMCCommandNode.getRedirectModifier();

getRelevantNodes

Return Type: Collection<MCCommandNode>

ZenScript
Copy
MCCommandNode.getRelevantNodes(input as string) as Collection<MCCommandNode>
参数类型描述
input(输入)stringNo Description Provided

getRequirement

Return Type: Predicate<MCCommandSource>

ZenScript
Copy
MCCommandNode.getRequirement() as Predicate<MCCommandSource>
myMCCommandNode.getRequirement();

getUsageText

Return Type: string

ZenScript
Copy
MCCommandNode.getUsageText() as string
myMCCommandNode.getUsageText();

hashCode

Return Type: int

ZenScript
Copy
MCCommandNode.hashCode() as int
myMCCommandNode.hashCode();

isFork

Return Type: boolean

ZenScript
Copy
MCCommandNode.isFork() as boolean
myMCCommandNode.isFork();

listSuggestions

Return Type: MCSuggestions

ZenScript
Copy
MCCommandNode.listSuggestions(context as MCCommandContext, builder as MCSuggestionsBuilder) as MCSuggestions
参数类型描述
上下文:MCCommandContextNo Description Provided
生成器MCSuggestionsBuilderNo Description Provided

parse

Return Type: void

ZenScript
Copy
MCCommandNode.parse(input as string, contextBuilder as MCCommandContextBuilder) as void
参数类型描述
input(输入)stringNo Description Provided
contextBuilderMCCommandContextBuilderNo Description Provided

toString

Return Type: string

ZenScript
Copy
MCCommandNode.toString() as string
myMCCommandNode.toString();

运算符

COMPARE

ZenScript
Copy
myMCCommandNode < o as MCCommandNode

EQUALS

ZenScript
Copy
myMCCommandNode == o as Object