zh_cn:tutorial:command_argument_types
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
zh_cn:tutorial:command_argument_types [2023/04/20 11:09] – 没有必要使用 SystemUtil solidblock | zh_cn:tutorial:command_argument_types [2023/04/20 11:11] – fix type solidblock | ||
---|---|---|---|
Line 42: | Line 42: | ||
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
- | 最终,我们检票我们的参数是否正确,并解析我们的参数,如果解析失败则抛出异常。 | + | 最终,我们检查我们的参数是否正确,并解析我们的参数,如果解析失败则抛出异常。 |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 88: | Line 88: | ||
public static <S> UUID getUuid(String name, CommandContext< | public static <S> UUID getUuid(String name, CommandContext< | ||
// 注意你应该假设 CommandContext 中包含的 CommandSource 是一个泛型类型。 | // 注意你应该假设 CommandContext 中包含的 CommandSource 是一个泛型类型。 | ||
- | // 如果你需要访问 ServerCommandSource,确保你在强转之前验证了源。 | + | // 如果你需要访问 ServerCommandSource,确保你在强转之前验证了命令源。 |
return context.getArgument(name, | return context.getArgument(name, | ||
} | } |
zh_cn/tutorial/command_argument_types.txt · Last modified: 2024/04/15 07:24 by solidblock