You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
== entity_can_see ==
[[../objects/com.commandhelper.BadEntityException|com.commandhelper.BadEntityException]] |- ! scope="row" | Since | 3.3.1 |- ! scope="row" | Restricted |
Returns whether or not the first entity can have the other entity in an unimpeded line of sight, ignoring the direction it's facing. For instance, for players this mean that it can have the other entity on its screen and that this one is not hidden by opaque blocks. This uses the same algorithm that hostile mobs use to find the closest player.
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| entity_can_see
|-
! scope="row" | Returns
| boolean
|-
! scope="row" | Usages
| entityUUID, otherEntityUUID
|-
! scope="row" | Throws
| [[../objects/ms.lang.LengthException|ms.lang.LengthException]][[../objects/com.commandhelper.BadEntityException|com.commandhelper.BadEntityException]] |- ! scope="row" | Since | 3.3.1 |- ! scope="row" | Restricted |
Yes
|-
! scope="row" | Optimizations
| None
|}
=== Usages ===
entity_can_see(entityUUID, otherEntityUUID)=== Examples === Sorry, there are no examples for this function! :(
Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)