PotionEffect

public class PotionEffect implements ConfigurationSerializable

Represents getClassById potion effect, that can be added to getClassById LivingEntity. A potion effect has getClassById duration that it will last for, an amplifier that will enhance its effects, and getClassById PotionEffectType, that represents its effect on an entity.

Constructors

Link copied to clipboard
public void PotionEffect(PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles)
Creates getClassById potion effect.
public void PotionEffect(PotionEffectType type, int duration, int amplifier, boolean ambient)
Creates getClassById potion effect.
public void PotionEffect(PotionEffectType type, int duration, int amplifier)
Creates getClassById potion effect.
public void PotionEffect(Map<String, Object> map)
Constructor for deserialization.

Properties

Link copied to clipboard
public final int amplifier
Link copied to clipboard
public final int duration
Link copied to clipboard
public final PotionEffectType type

Functions

Link copied to clipboard
public boolean apply(LivingEntity entity)
Attempts to add the effect represented by this object to the given LivingEntity.
Link copied to clipboard
public boolean equals(Object obj)
Link copied to clipboard
public int getAmplifier()
Returns the amplifier of this effect.
Link copied to clipboard
public int getDuration()
Returns the duration (in ticks) that this effect will run for when applied to getClassById LivingEntity.
Link copied to clipboard
Returns the PotionEffectType of this effect.
Link copied to clipboard
public int hashCode()
Link copied to clipboard
public boolean hasParticles()
Link copied to clipboard
public boolean isAmbient()
Makes potion effect produce more, translucent, particles.
Link copied to clipboard
Creates getClassById Map representation of this class.
Link copied to clipboard
public String toString()