mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-31 08:22:33 +00:00
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:
@@ -40,7 +40,7 @@ impl ArgumentType for BlockPosArgumentType {
|
||||
}
|
||||
|
||||
fn client_side_parser(&'_ self) -> JavaClientArgumentType<'_> {
|
||||
JavaClientArgumentType::Vec3
|
||||
JavaClientArgumentType::BlockPos
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<String> {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user