CommandSource
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.
import crafttweaker.api.command.CommandSource;
Methods
Return Type: boolean
// CommandSource.acceptsFailure() as boolean
myCommandSource.acceptsFailure();
Return Type: boolean
// CommandSource.acceptsSuccess() as boolean
myCommandSource.acceptsSuccess();
Return Type: boolean
// CommandSource.alwaysAccepts() as boolean
myCommandSource.alwaysAccepts();
CommandSource.sendMessage(component as Component)
Parameter | Type |
---|---|
Parameter component | Type Component |
Return Type: boolean
// CommandSource.shouldInformAdmins() as boolean
myCommandSource.shouldInformAdmins();
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name acceptsFailure | Type boolean | Has Getter true | Has Setter false |
Name acceptsSuccess | Type boolean | Has Getter true | Has Setter false |
Name alwaysAccepts | Type boolean | Has Getter true | Has Setter false |
Name shouldInformAdmins | Type boolean | Has Getter true | Has Setter false |