geforkt von Mirrors/Paper
SPIGOT-2578: Method to get PotionEffect of specific type.
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
bab2e9ce17
Commit
d57088a9c9
@ -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}.
|
||||
*
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren