MCCommandSource

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

Methods

Return Type: string

script.zs
// MCCommandSource.getName() as string
myMCCommandSource.getName();

Return Type: MCPlayerEntity?

script.zs
// MCCommandSource.getPlayer() as MCPlayerEntity?
myMCCommandSource.getPlayer();

Return Type: Collection<string>

script.zs
// MCCommandSource.getPlayerNames() as Collection<string>
myMCCommandSource.getPlayerNames();

Return Type: Collection<string>

script.zs
// MCCommandSource.getTargetedEntity() as Collection<string>
myMCCommandSource.getTargetedEntity();

Return Type: Collection<string>

script.zs
// MCCommandSource.getTeamNames() as Collection<string>
myMCCommandSource.getTeamNames();

Return Type: boolean

script.zs
MCCommandSource.hasPermissionLevel(p_197034_1_ as int) as boolean
ParameterTypeDescription
Parameter
p_197034_1_
Type
int
Description
No Description Provided

Return Type: boolean

script.zs
// MCCommandSource.isPlayer() as boolean
myMCCommandSource.isPlayer();

Return Type: void

script.zs
MCCommandSource.sendErrorMessage(message as string) as void
ParameterTypeDescription
Parameter
message
Type
string
Description
No Description Provided

Return Type: void

script.zs
MCCommandSource.sendFeedback(feedback as string, allowLogging as boolean) as void
ParameterTypeDescription
Parameter
feedback
Type
string
Description
No Description Provided
Parameter
allowLogging
Type
boolean
Description
No Description Provided

Return Type: MCCommandSource

script.zs
// MCCommandSource.withFeedbackDisabled() as MCCommandSource
myMCCommandSource.withFeedbackDisabled();

Return Type: MCCommandSource

script.zs
MCCommandSource.withMinPermissionLevel(p_197026_1_ as int) as MCCommandSource
ParameterTypeDescription
Parameter
p_197026_1_
Type
int
Description
No Description Provided

Return Type: MCCommandSource

script.zs
MCCommandSource.withPermissionLevel(p_197033_1_ as int) as MCCommandSource
ParameterTypeDescription
Parameter
p_197033_1_
Type
int
Description
No Description Provided