diff --git a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java index 22de9f72be..69eda6de34 100644 --- a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java @@ -276,6 +276,16 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti */ public boolean hasPotionEffect(PotionEffectType type); + /** + * Returns the active {@link PotionEffect} of the specified type. + *
+ * 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}. *