summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2012-12-04 19:16:33 -0600
committerTravis Watkins <amaranth@ubuntu.com>2012-12-04 21:30:44 -0600
commitccf33ccdfbcaad4be59c7e2f27098e46803e0b76 (patch)
treead09021cc91869bb9fc2b1068d6ffb84d2b576a8 /src/main
parent1a5998a5d52320bbe47945b62df3f8bb0f9611d0 (diff)
downloadbukkit-ccf33ccdfbcaad4be59c7e2f27098e46803e0b76.tar
bukkit-ccf33ccdfbcaad4be59c7e2f27098e46803e0b76.tar.gz
bukkit-ccf33ccdfbcaad4be59c7e2f27098e46803e0b76.tar.lz
bukkit-ccf33ccdfbcaad4be59c7e2f27098e46803e0b76.tar.xz
bukkit-ccf33ccdfbcaad4be59c7e2f27098e46803e0b76.zip
Add API for controlling mob despawn away from players. Adds BUKKIT-2986
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/entity/LivingEntity.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index e93453a3..af292397 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -278,4 +278,19 @@ public interface LivingEntity extends Entity {
* @return true if there is a line of sight, false if not.
*/
public boolean hasLineOfSight(Entity other);
+
+ /**
+ * Returns if the entity despawns when away from players or not.<br />
+ * By default animals are not removed while other mobs are.
+ *
+ * @return true if the entity is removed when away from players
+ */
+ public boolean getRemoveWhenFarAway();
+
+ /**
+ * Sets whether or not the entity despawns when away from players or not.
+ *
+ * @param remove The remove status
+ */
+ public void setRemoveWhenFarAway(boolean remove);
}