Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

CommandSource

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.command.CommandSource;

Members

Getter
script.zs
// CommandSource.acceptsFailure as bool
myCommandSource.acceptsFailure

Return Type: bool

acceptsFailure() as bool
script.zs
// CommandSource.acceptsFailure() as bool;
myCommandSource.acceptsFailure();

Return Type: bool

Getter
script.zs
// CommandSource.acceptsSuccess as bool
myCommandSource.acceptsSuccess

Return Type: bool

acceptsSuccess() as bool
script.zs
// CommandSource.acceptsSuccess() as bool;
myCommandSource.acceptsSuccess();

Return Type: bool

Getter
script.zs
// CommandSource.alwaysAccepts as bool
myCommandSource.alwaysAccepts

Return Type: bool

alwaysAccepts() as bool
script.zs
// CommandSource.alwaysAccepts() as bool;
myCommandSource.alwaysAccepts();

Return Type: bool

sendMessage(component as Component)
script.zs
// CommandSource.sendMessage(component as Component);
myCommandSource.sendMessage(myComponent);

Parameters:

component Type: Component
Getter
script.zs
// CommandSource.shouldInformAdmins as bool
myCommandSource.shouldInformAdmins

Return Type: bool

shouldInformAdmins() as bool
script.zs
// CommandSource.shouldInformAdmins() as bool;
myCommandSource.shouldInformAdmins();

Return Type: bool