MC命令源
Link to mc命令源
导入类
Link to 导入类
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.commands.custom.MCCommandSource;
使用方式
Link to 使用方式
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();
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();
Name: hasPermissionLevel
Return Type: boolean
ZenScript CopyMCCommandSource.hasPermissionLevel(p_197034_1_ as int) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 p_197034_1_ | 类型 int | 描述 No Description Provided |
Name: isPlayer
Return Type: boolean
ZenScript Copy// MCCommandSource.isPlayer() as boolean
myMCCommandSource.isPlayer();
Name: sendErrorMessage
Return Type: void
ZenScript CopyMCCommandSource.sendErrorMessage(message as string) as void
参数 | 类型 | 描述 |
---|---|---|
参数 message | 类型 string | 描述 No Description Provided |
Name: sendFeedback
Return Type: void
ZenScript CopyMCCommandSource.sendFeedback(feedback as string, allowLogging as boolean) as void
参数 | 类型 | 描述 |
---|---|---|
参数 反馈 | 类型 string | 描述 No Description Provided |
参数 allowLogging #允许记录日志 | 类型 布尔值 | 描述 No Description Provided |
Name: withFeedbackDisabled
Return Type: MCCommandSource
ZenScript Copy// MCCommandSource.withFeedbackDisabled() as MCCommandSource
myMCCommandSource.withFeedbackDisabled();
Name: withMinPermissionLevel
Return Type: MCCommandSource
ZenScript CopyMCCommandSource.withMinPermissionLevel(p_197026_1_ as int) as MCCommandSource
参数 | 类型 | 描述 |
---|---|---|
参数 p_197026_1_ | 类型 int | 描述 No Description Provided |
Name: withPermissionLevel
Return Type: MCCommandSource
ZenScript CopyMCCommandSource.withPermissionLevel(p_197033_1_ as int) as MCCommandSource
参数 | 类型 | 描述 |
---|---|---|
参数 p_197033_1_ | 类型 int | 描述 No Description Provided |