MC命令

导入相关包

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

Constructor #构造函数

No Description Provided

ZenScript
Copy
new MCCommand(fun as Function<MCCommandContext,Integer>) as MCCommand
参数类型描述
有趣的Function<MCCommandContext,Integer>No Description Provided

Casters

结果类型是否隐藏
stringtrue

方法

equals #等于

Return Type: boolean

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

hashCode

Return Type: int

ZenScript
Copy
MCCommand.hashCode() as int
myMCCommand.hashCode();

运行

Return Type: int

ZenScript
Copy
MCCommand.run(context as MCCommandContext) as int
参数类型描述
上下文:MCCommandContextNo Description Provided

toString

Return Type: string

ZenScript
Copy
MCCommand.toString() as string
myMCCommand.toString();

运算符

EQUALS

ZenScript
Copy
myMCCommand == o 为对象