<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<dd><code><ahref="../configuration/serialization/ConfigurationSerializable.html"title="interface in org.bukkit.configuration.serialization">ConfigurationSerializable</a></code></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public class </span><spanclass="element-name type-name-label">PotionEffect</span>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>
implements <ahref="../configuration/serialization/ConfigurationSerializable.html"title="interface in org.bukkit.configuration.serialization">ConfigurationSerializable</a></span></div>
<divclass="block">Represents a potion effect, that can be added to a <ahref="../entity/LivingEntity.html"title="interface in org.bukkit.entity"><code>LivingEntity</code></a>. A
potion effect has a duration that it will last for, an amplifier that will
enhance its effects, and a <ahref="PotionEffectType.html"title="class in org.bukkit.potion"><code>PotionEffectType</code></a>, that represents its
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(java.util.Map)"class="member-name-link">PotionEffect</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html"title="class or interface in java.util"class="external-link">Map</a><<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a>,<wbr><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>> map)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Constructor for deserialization.</div>
</div>
<divclass="col-constructor-name odd-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.potion.PotionEffectType,int,int)"class="member-name-link">PotionEffect</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier)</code></div>
<divclass="col-last odd-row-color">
<divclass="block">Creates a potion effect.</div>
</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.potion.PotionEffectType,int,int,boolean)"class="member-name-link">PotionEffect</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier,
boolean ambient)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Creates a potion effect.</div>
</div>
<divclass="col-constructor-name odd-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.potion.PotionEffectType,int,int,boolean,boolean)"class="member-name-link">PotionEffect</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier,
boolean ambient,
boolean particles)</code></div>
<divclass="col-last odd-row-color">
<divclass="block">Creates a potion effect with no defined color.</div>
</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.potion.PotionEffectType,int,int,boolean,boolean,boolean)"class="member-name-link">PotionEffect</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#apply(org.bukkit.entity.LivingEntity)"class="member-name-link">apply</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../entity/LivingEntity.html"title="interface in org.bukkit.entity">LivingEntity</a> entity)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#equals(java.lang.Object)"class="member-name-link">equals</a><wbr>(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a> obj)</code></div>
<divclass="block">Returns the amplifier of this effect.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../Color.html"title="class in org.bukkit">Color</a></code></div>
<divclass="block">Returns the duration (in ticks) that this effect will run for when
applied to a <ahref="../entity/LivingEntity.html"title="interface in org.bukkit.entity"><code>LivingEntity</code></a>.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a></code></div>
<divclass="block">Makes potion effect produce more, translucent, particles.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html"title="class or interface in java.util"class="external-link">Map</a><<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a>,<wbr><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>></code></div>
<divclass="block">Creates a Map representation of this class.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></code></div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></code></div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></code></div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#withType(org.bukkit.potion.PotionEffectType)"class="member-name-link">withType</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type)</code></div>
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()"title="class or interface in java.lang"class="external-link">clone</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()"title="class or interface in java.lang"class="external-link">finalize</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">PotionEffect</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier,
boolean ambient,
boolean particles,
boolean icon)</span></div>
<divclass="block">Creates a potion effect.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - effect type</dd>
<dd><code>duration</code> - measured in ticks, see <ahref="#getDuration()"><code>getDuration()</code></a></dd>
<dd><code>amplifier</code> - the amplifier, see <ahref="#getAmplifier()"><code>getAmplifier()</code></a></dd>
<dd><code>ambient</code> - the ambient status, see <ahref="#isAmbient()"><code>isAmbient()</code></a></dd>
<dd><code>particles</code> - the particle status, see <ahref="#hasParticles()"><code>hasParticles()</code></a></dd>
<dd><code>icon</code> - the icon status, see <ahref="#hasIcon()"><code>hasIcon()</code></a></dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">PotionEffect</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier,
boolean ambient,
boolean particles)</span></div>
<divclass="block">Creates a potion effect with no defined color.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - effect type</dd>
<dd><code>duration</code> - measured in ticks, see <ahref="#getDuration()"><code>getDuration()</code></a></dd>
<dd><code>amplifier</code> - the amplifier, see <ahref="#getAmplifier()"><code>getAmplifier()</code></a></dd>
<dd><code>ambient</code> - the ambient status, see <ahref="#isAmbient()"><code>isAmbient()</code></a></dd>
<dd><code>particles</code> - the particle status, see <ahref="#hasParticles()"><code>hasParticles()</code></a></dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">PotionEffect</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier,
boolean ambient)</span></div>
<divclass="block">Creates a potion effect. Assumes that particles are visible</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - effect type</dd>
<dd><code>duration</code> - measured in ticks, see <ahref="#getDuration()"><code>getDuration()</code></a></dd>
<dd><code>amplifier</code> - the amplifier, see <ahref="#getAmplifier()"><code>getAmplifier()</code></a></dd>
<dd><code>ambient</code> - the ambient status, see <ahref="#isAmbient()"><code>isAmbient()</code></a></dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">PotionEffect</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type,
int duration,
int amplifier)</span></div>
<divclass="block">Creates a potion effect. Assumes ambient is true.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - Effect type</dd>
<dd><code>duration</code> - measured in ticks</dd>
<dd><code>amplifier</code> - the amplifier for the effect</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">PotionEffect</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html"title="class or interface in java.util"class="external-link">Map</a><<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a>,<wbr><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>> map)</span></div>
<divclass="block">Constructor for deserialization.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>map</code> - the map to deserialize from</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></span> <spanclass="element-name">withType</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a> type)</span></div>
</section>
</li>
<li>
<sectionclass="detail"id="withDuration(int)">
<h3>withDuration</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></span> <spanclass="element-name">withDuration</span><wbr><spanclass="parameters">(int duration)</span></div>
</section>
</li>
<li>
<sectionclass="detail"id="withAmplifier(int)">
<h3>withAmplifier</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></span> <spanclass="element-name">withAmplifier</span><wbr><spanclass="parameters">(int amplifier)</span></div>
</section>
</li>
<li>
<sectionclass="detail"id="withAmbient(boolean)">
<h3>withAmbient</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></span> <spanclass="element-name">withAmbient</span><wbr><spanclass="parameters">(boolean ambient)</span></div>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></span> <spanclass="element-name">withParticles</span><wbr><spanclass="parameters">(boolean particles)</span></div>
</section>
</li>
<li>
<sectionclass="detail"id="withIcon(boolean)">
<h3>withIcon</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffect.html"title="class in org.bukkit.potion">PotionEffect</a></span> <spanclass="element-name">withIcon</span><wbr><spanclass="parameters">(boolean icon)</span></div>
</section>
</li>
<li>
<sectionclass="detail"id="serialize()">
<h3>serialize</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html"title="class or interface in java.util"class="external-link">Map</a><<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a>,<wbr><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>></span> <spanclass="element-name">serialize</span>()</div>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="../configuration/serialization/ConfigurationSerializable.html#serialize()">ConfigurationSerializable</a></code></span></div>
<divclass="block">Creates a Map representation of this class.
<p>
This class must provide a method to restore this class, as defined in
the <ahref="../configuration/serialization/ConfigurationSerializable.html"title="interface in org.bukkit.configuration.serialization"><code>ConfigurationSerializable</code></a> interface javadocs.</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../configuration/serialization/ConfigurationSerializable.html#serialize()">serialize</a></code> in interface <code><ahref="../configuration/serialization/ConfigurationSerializable.html"title="interface in org.bukkit.configuration.serialization">ConfigurationSerializable</a></code></dd>
<dt>Returns:</dt>
<dd>Map containing the current state of this class</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">boolean</span> <spanclass="element-name">apply</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../entity/LivingEntity.html"title="interface in org.bukkit.entity">LivingEntity</a> entity)</span></div>
<divclass="block">Attempts to add the effect represented by this object to the given
<ahref="../entity/LivingEntity.html"title="interface in org.bukkit.entity"><code>LivingEntity</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>entity</code> - The entity to add this effect to</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">boolean</span> <spanclass="element-name">equals</span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a> obj)</span></div>
<dlclass="notes">
<dt>Overrides:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a></code> in class <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></code></dd>
<divclass="block">Returns the duration (in ticks) that this effect will run for when
applied to a <ahref="../entity/LivingEntity.html"title="interface in org.bukkit.entity"><code>LivingEntity</code></a>.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>The duration of the effect</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getType()">
<h3>getType</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="PotionEffectType.html"title="class in org.bukkit.potion">PotionEffectType</a></span> <spanclass="element-name">getType</span>()</div>
<divclass="block">Returns the <ahref="PotionEffectType.html"title="class in org.bukkit.potion"><code>PotionEffectType</code></a> of this effect.</div>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Contract.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Contract</a>("-> null")
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../Color.html"title="class in org.bukkit">Color</a></span> <spanclass="element-name">getColor</span>()</div>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a></code> in class <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="toString()">
<h3>toString</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></span> <spanclass="element-name">toString</span>()</div>
<dlclass="notes">
<dt>Overrides:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"title="class or interface in java.lang"class="external-link">toString</a></code> in class <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></code></dd>