mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-2578: Method to get PotionEffect of specific type.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
bab2e9ce17
commit
d57088a9c9
1 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
* <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}.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue