MCCommandContext

导入相关包

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.MCCommandContext;

Casters

结果类型是否隐藏
stringtrue

方法

copyFor

Return Type: MCCommandContext

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

equals #等于

Return Type: boolean

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

获取参数

Return Type: string

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

getChild

Return Type: MCCommandContext

ZenScript
Copy
MCCommandContext.getChild() as MCCommandContext
myMCCommandContext.getChild();

getCommand

Return Type: MCCommand

ZenScript
Copy
MCCommandContext.getCommand() as MCCommand
myMCCommandContext.getCommand();

getInput

Return Type: string

ZenScript
Copy
MCCommandContext.getInput() as string
myMCCommandContext.getInput();

getLastChild

Return Type: MCCommandContext

ZenScript
Copy
MCCommandContext.getLastChild() as MCCommandContext
myMCCommandContext.getLastChild();

getNodes

Return Type: stdlib.List<MCParsedCommandNode>

ZenScript
Copy
MCCommandContext.getNodes() as stdlib.List<MCParsedCommandNode>
myMCCommandContext.getNodes();

getRange

Return Type: MCStringRange

ZenScript
Copy
MCCommandContext.getRange() as MCStringRange
myMCCommandContext.getRange();

获取重定向修改器

Return Type: MCRedirectModifier

ZenScript
Copy
MCCommandContext.getRedirectModifier() as MCRedirectModifier
myMCCommandContext.getRedirectModifier();

getRootNode

Return Type: MCCommandNode

ZenScript
Copy
MCCommandContext.getRootNode() as MCCommandNode
myMCCommandContext.getRootNode();

getSource

Return Type: MCCommandSource

ZenScript
Copy
MCCommandContext.getSource() as MCCommandSource
myMCCommandContext.getSource();

hasNodes

Return Type: boolean

ZenScript
Copy
MCCommandContext.hasNodes() as boolean
myMCCommandContext.hasNodes();

hashCode

Return Type: int

ZenScript
Copy
MCCommandContext.hashCode() as int
myMCCommandContext.hashCode();

isForked

Return Type: boolean

ZenScript
Copy
MCCommandContext.isForked() as boolean
myMCCommandContext.isForked();

toString

Return Type: string

ZenScript
Copy
MCCommandContext.toString() as string
myMCCommandContext.toString();

运算符

EQUALS

ZenScript
Copy
myMCCommandContext == o 为对象