diff options
author | md_5 <git@md-5.net> | 2016-08-07 10:53:34 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-08-07 10:53:34 +1000 |
commit | 18490e51b1665bf838cebd163d11f1aabde4cffe (patch) | |
tree | 2862f07b44e76ab1eb2b13e2e72b2608869f7598 /src/main/java/org | |
parent | 78d84f67890ed0ba57c1701cfd6c1ef94e89899d (diff) | |
download | bukkit-18490e51b1665bf838cebd163d11f1aabde4cffe.tar bukkit-18490e51b1665bf838cebd163d11f1aabde4cffe.tar.gz bukkit-18490e51b1665bf838cebd163d11f1aabde4cffe.tar.lz bukkit-18490e51b1665bf838cebd163d11f1aabde4cffe.tar.xz bukkit-18490e51b1665bf838cebd163d11f1aabde4cffe.zip |
SPIGOT-2578: Method to get PotionEffect of specific type.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/entity/LivingEntity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 22de9f72..69eda6de 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -277,6 +277,16 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti public boolean hasPotionEffect(PotionEffectType type); /** + * Returns the active {@link PotionEffect} of the specified type. + * <p> + * If the effect is not present on the entity then null will be returned. + * + * @param type the potion type to check + * @return the effect active on this entity, or null if not active. + */ + public PotionEffect getPotionEffect(PotionEffectType type); + + /** * Removes any effects present of the given {@link PotionEffectType}. * * @param type the potion type to remove |