From 697e67f3e699673158198ff46e3a6c1bf612834e Mon Sep 17 00:00:00 2001 From: aPunch Date: Thu, 16 Feb 2012 15:14:12 -0600 Subject: [Bleeding] Added launchProjectile. Use launchProjectile in place of individual throwSnowball, throwEgg, and shootArrow methods --- src/main/java/org/bukkit/entity/LivingEntity.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index a6b4e9b2..3c0f4cae 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -90,24 +90,39 @@ public interface LivingEntity extends Entity { /** * Throws an egg from the entity. * + * @deprecated Use launchProjectile(Egg.class) instead * @return The egg thrown. */ + @Deprecated public Egg throwEgg(); /** * Throws a snowball from the entity. * + * @deprecated Use launchProjectile(Snowball.class) instead * @return The snowball thrown. */ + @Deprecated public Snowball throwSnowball(); /** * Shoots an arrow from the entity. * + * @deprecated Use launchProjectile(Arrow.class) instead * @return The arrow shot. */ + @Deprecated public Arrow shootArrow(); + /** + * Launches a {@link Projectile} from the entity. + * + * @param projectile Class of the projectile to launch + * + * @return The launched projectile. + */ + public T launchProjectile(Class projectile); + /** * Returns whether this entity is inside a vehicle. * -- cgit v1.2.3