MCCommand

Importing the class

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.

script.zs
import crafttweaker.api.commands.custom.MCCommand;

Constructors

No Description Provided

script.zs
new MCCommand(fun as ToIntFunction<MCCommandContext>) as MCCommand
ParameterTypeDescription
Parameter
fun
Type
ToIntFunction<MCCommandContext>
Description
No Description Provided

Casters

Result typeIs Implicit
Result type
string
Is Implicit
true

Methods

Return Type: boolean

script.zs
MCCommand.equals(o as Object) as boolean
ParameterTypeDescription
Parameter
o
Type
Object
Description
No Description Provided

Return Type: int

script.zs
// MCCommand.hashCode() as int
myMCCommand.hashCode();

Return Type: int

script.zs
MCCommand.run(context as MCCommandContext) as int
ParameterTypeDescription
Parameter
context
Type
MCCommandContext
Description
No Description Provided

Return Type: string

script.zs
// MCCommand.toString() as string
myMCCommand.toString();

Operators

script.zs
myMCCommand == o as Object