mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
SPIGOT-2578: Method to get PotionEffect of specific type.
This commit is contained in:
parent
78d84f6789
commit
18490e51b1
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…
Add table
Reference in a new issue