CommandSource
Link to commandsource
Importing the class
Link to 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.
ZenScript Copyimport crafttweaker.api.command.CommandSource;
Methods
Link to methods
Name: acceptsFailure
Return Type: boolean
ZenScript Copy// CommandSource.acceptsFailure() as boolean
myCommandSource.acceptsFailure();
Name: acceptsSuccess
Return Type: boolean
ZenScript Copy// CommandSource.acceptsSuccess() as boolean
myCommandSource.acceptsSuccess();
Name: alwaysAccepts
Return Type: boolean
ZenScript Copy// CommandSource.alwaysAccepts() as boolean
myCommandSource.alwaysAccepts();
Name: sendMessage
ZenScript CopyCommandSource.sendMessage(component as Component, senderUUID as invalid)
Parameter | Type |
---|---|
Parameter component | Type Component |
Parameter senderUUID | Type invalid |
Name: shouldInformAdmins
Return Type: boolean
ZenScript Copy// CommandSource.shouldInformAdmins() as boolean
myCommandSource.shouldInformAdmins();
Properties
Link to properties
名称 | Type | Has Getter | Has Setter |
---|---|---|---|
名称 acceptsFailure | Type boolean型 | Has Getter true | Has Setter false |
名称 acceptsSuccess | Type boolean型 | Has Getter true | Has Setter false |
名称 alwaysAccepts | Type boolean型 | Has Getter true | Has Setter false |
名称 shouldInformAdmins | Type boolean型 | Has Getter true | Has Setter false |