fix(command): fix java client argument type for BlockPos and correct EntityArgumentType docs (#2001)

* fixed some mistakes

* updated entity argument type docs

* used commas instead of colons for listing `EntityArgumentType` variants

* mentioned `associated function`
This commit is contained in:
SomeYellowGuy
2026-04-12 13:22:20 +05:30
committed by GitHub
parent 988ef8764f
commit 11513896df
2 changed files with 16 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ impl ArgumentType for BlockPosArgumentType {
}
fn client_side_parser(&'_ self) -> JavaClientArgumentType<'_> {
JavaClientArgumentType::Vec3
JavaClientArgumentType::BlockPos
}
fn examples(&self) -> Vec<String> {

View File

@@ -32,8 +32,21 @@ pub const NOT_SINGLE_PLAYER_ERROR_TYPE: CommandErrorType<0> =
pub const ENTITY_SELECTOR_PERMISSION: &str = "minecraft:command.selector";
/// Represents an argument type parsing a [`TargetSelector`]. This argument type is used
/// to target entities.
/// Represents an argument type used to select entities.
///
/// The following variants of this argument type are:
/// - [`EntityArgumentType::Entity`], for a single entity.
/// - [`EntityArgumentType::Entities`], for any number of entities.
/// - [`EntityArgumentType::Player`], for a single player.
/// - [`EntityArgumentType::Players`], for any number of players.
///
/// Though this argument type does parse an `EntitySelector`, it should not be used directly.
/// Instead, use one of these associated functions accepting a [`CommandContext`]
/// and your argument's name:
/// - [`EntityArgumentType::get_entity`]
/// - [`EntityArgumentType::get_entities`]
/// - [`EntityArgumentType::get_player`]
/// - [`EntityArgumentType::get_players`]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum EntityArgumentType {
Entity,