Importare la Classe

Link to importare-la-classe

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
Copy
import crafttweaker.api.commands.custom.MCCommandSource;

Name: getName

Return Type: string

ZenScript
Copy
// MCCommandSource.getName() as string

myMCCommandSource.getName();

Name: getPlayer

Return Type: MCPlayerEntity?

ZenScript
Copy
// MCCommandSource.getPlayer() as MCPlayerEntity?

myMCCommandSource.getPlayer();

Name: getPlayerNames

Return Type: Collection<string>

ZenScript
Copy
// MCCommandSource.getPlayerNames() as Collection<string>

myMCCommandSource.getPlayerNames();

Link to getTargetedEntity

Name: getTargetedEntity

Return Type: Collection<string>

ZenScript
Copy
// MCCommandSource.getTargetedEntity() as Collection<string>

myMCCommandSource.getTargetedEntity();

Name: getTeamNames

Return Type: Collection<string>

ZenScript
Copy
// MCCommandSource.getTeamNames() as Collection<string>

myMCCommandSource.getTeamNames();

Link to hasPermissionLevel

Name: hasPermissionLevel

Return Type: boolean

ZenScript
Copy
MCCommandSource.hasPermissionLevel(p_197034_1_ as int) as boolean
ParametroTipoDescrizione
Parametro
p_197034_1_
Tipo
int
Descrizione
No Description Provided

Name: isPlayer

Return Type: boolean

ZenScript
Copy
// MCCommandSource.isPlayer() as boolean

myMCCommandSource.isPlayer();

Link to sendErrorMessage

Name: sendErrorMessage

Return Type: void

ZenScript
Copy
MCCommandSource.sendErrorMessage(message as string) as void
ParametroTipoDescrizione
Parametro
message
Tipo
string
Descrizione
No Description Provided

Name: sendFeedback

Return Type: void

ZenScript
Copy
MCCommandSource.sendFeedback(feedback as string, allowLogging as boolean) as void
ParametroTipoDescrizione
Parametro
feedback
Tipo
string
Descrizione
No Description Provided
Parametro
allowLogging
Tipo
boolean
Descrizione
No Description Provided

Link to withFeedbackDisabled

Name: withFeedbackDisabled

Return Type: MCCommandSource

ZenScript
Copy
// MCCommandSource.withFeedbackDisabled() as MCCommandSource

myMCCommandSource.withFeedbackDisabled();

Link to withMinPermissionLevel

Name: withMinPermissionLevel

Return Type: MCCommandSource

ZenScript
Copy
MCCommandSource.withMinPermissionLevel(p_197026_1_ as int) as MCCommandSource
ParametroTipoDescrizione
Parametro
p_197026_1_
Tipo
int
Descrizione
No Description Provided

Link to withPermissionLevel

Name: withPermissionLevel

Return Type: MCCommandSource

ZenScript
Copy
MCCommandSource.withPermissionLevel(p_197033_1_ as int) as MCCommandSource
ParametroTipoDescrizione
Parametro
p_197033_1_
Tipo
int
Descrizione
No Description Provided