summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-27 20:19:23 +1100
committermd_5 <git@md-5.net>2016-03-27 20:31:58 +1100
commit21df80186f60e6f13ac9191c9f604a76b1b0b9d5 (patch)
treef3cd853cd05418eb402fafd84e457e7929e5b6b6 /src/main/java/org
parent67b9a6f66b74a8df1977067ef2bbf45274da1bdf (diff)
downloadbukkit-21df80186f60e6f13ac9191c9f604a76b1b0b9d5.tar
bukkit-21df80186f60e6f13ac9191c9f604a76b1b0b9d5.tar.gz
bukkit-21df80186f60e6f13ac9191c9f604a76b1b0b9d5.tar.lz
bukkit-21df80186f60e6f13ac9191c9f604a76b1b0b9d5.tar.xz
bukkit-21df80186f60e6f13ac9191c9f604a76b1b0b9d5.zip
SPIGOT-2060: Method to control whether entities collide
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/entity/LivingEntity.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 8827c6c7..22de9f72 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -394,4 +394,26 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
* @return true if the entity has AI, otherwise false.
*/
boolean hasAI();
+
+ /**
+ * Set if this entity will be subject to collisions other entities.
+ * <p>
+ * Note that collisions are bidirectional, so this method would need to be
+ * set to false on both the collidee and the collidant to ensure no
+ * collisions take place.
+ *
+ * @param collidable collision status
+ */
+ void setCollidable(boolean collidable);
+
+ /**
+ * Gets if this entity is subject to collisions with other entities.
+ * <p>
+ * Please note that this method returns only the custom collidable state,
+ * not whether the entity is non-collidable for other reasons such as being
+ * dead.
+ *
+ * @return collision status
+ */
+ boolean isCollidable();
}