From 84f4ae040e6a88e204f2c5a2dffb03d0c3a5c757 Mon Sep 17 00:00:00 2001 From: Zak Shearman <34372536+ZakShearman@users.noreply.github.com> Date: Sun, 27 Nov 2022 22:01:50 +0000 Subject: [PATCH] Re-word docs for Entity#lookAt(Entity) (#1543) --- src/main/java/net/minestom/server/entity/Entity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/entity/Entity.java b/src/main/java/net/minestom/server/entity/Entity.java index 2ee9ea5b7..daf0ece5b 100644 --- a/src/main/java/net/minestom/server/entity/Entity.java +++ b/src/main/java/net/minestom/server/entity/Entity.java @@ -350,9 +350,10 @@ public class Entity implements Viewable, Tickable, Schedulable, Snapshotable, Ev * Changes the view of the entity so that it looks in a direction to the given entity. * * @param entity the entity to look at. + * @throws IllegalArgumentException if the entities are not in the same instance */ public void lookAt(@NotNull Entity entity) { - Check.argCondition(entity.instance != instance, "Entity can look at another entity that is within it's own instance"); + Check.argCondition(entity.instance != instance, "Entity cannot look at an entity in another instance"); lookAt(entity.position.withY(entity.position.y() + entity.getEyeHeight())); }