Skip to content

Commit 8664be9

Browse files
committed
fix: fix docs error
1 parent c19869a commit 8664be9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/apis/GameAPI/Entity.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -390,28 +390,28 @@ Note that the damage dealt here is real damage and cannot be reduced by protecti
390390
`en.distanceToSqr(pos)`
391391

392392
- Parameters:
393-
- pos : `Entity` / `Entity` / `IntPos` / `FloatPos`
393+
- pos : `Entity` / `Player` / `IntPos` / `FloatPos`
394394
The target position.
395395
- Return value: Distance to coordinates (in blocks).
396396
- Return value type: `Number`
397397

398-
#### Determine if an Entity Object Is a Entity
398+
#### Determine if an Entity Object Is a Player
399399

400-
`en.isEntity()`
400+
`en.isPlayer()`
401401

402402
- Return value: Whether the current entity object is a entity.
403403
- Return value type: `Boolean`
404404

405-
#### Convert Entity Object to Entity Object
405+
#### Convert Entity Object to Player Object
406406

407-
`en.toEntity()`
407+
`en.toPlayer()`
408408

409-
- Return value: The converted `Entity` object.
410-
- Return value type: `Entity`
411-
- Returns `Null` if this entity object does not point to a entity, or if the transition fails.
409+
- Return value: The converted `Player` object.
410+
- Return value type: `Player`
411+
- Returns `Null` if this entity object does not point to a player, or if the transition fails.
412412

413-
If the current entity object points to a entity, you can use this function to convert the entity object to a entity
414-
object to use more entity-related APIs.
413+
If the current entity object points to a player, you can use this function to convert the entity object to a player
414+
object to use more player-related APIs.
415415

416416
#### Determine Whether an Entity Object Is a Dropped Item Entity
417417

0 commit comments

Comments
 (0)