<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>
<divclass="inheritance"><ahref="../Event.html"title="class in org.bukkit.event">org.bukkit.event.Event</a>
<divclass="inheritance"><ahref="EntityEvent.html"title="class in org.bukkit.event.entity">org.bukkit.event.entity.EntityEvent</a>
<divclass="col-second even-row-color"><code><ahref="EntityTargetEvent.TargetReason.html"class="type-name-link"title="enum class in org.bukkit.event.entity">EntityTargetEvent.TargetReason</a></code></div>
<divclass="col-last even-row-color">
<divclass="block">An enum to specify the reason for the targeting</div>
</div>
</div>
<divclass="inherited-list">
<h2id="nested-classes-inherited-from-class-org.bukkit.event.Event">Nested classes/interfaces inherited from class org.bukkit.event.<ahref="../Event.html"title="class in org.bukkit.event">Event</a></h2>
<code><ahref="../Event.Result.html"title="enum class in org.bukkit.event">Event.Result</a></code></div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<sectionclass="field-summary"id="field-summary">
<h2>Field Summary</h2>
<divclass="inherited-list">
<h3id="fields-inherited-from-class-org.bukkit.event.entity.EntityEvent">Fields inherited from class org.bukkit.event.entity.<ahref="EntityEvent.html"title="class in org.bukkit.event.entity">EntityEvent</a></h3>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.entity.Entity,org.bukkit.entity.Entity,org.bukkit.event.entity.EntityTargetEvent.TargetReason)"class="member-name-link">EntityTargetEvent</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/Entity.html"title="interface in org.bukkit.entity">Entity</a> entity,
<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="../../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a> target,
<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="EntityTargetEvent.TargetReason.html"title="enum class in org.bukkit.event.entity">EntityTargetEvent.TargetReason</a> reason)</code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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="../HandlerList.html"title="class in org.bukkit.event">HandlerList</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="../HandlerList.html"title="class in org.bukkit.event">HandlerList</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="EntityTargetEvent.TargetReason.html"title="enum class in org.bukkit.event.entity">EntityTargetEvent.TargetReason</a></code></div>
<divclass="block">Returns the reason for the targeting</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/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#setTarget(org.bukkit.entity.Entity)"class="member-name-link">setTarget</a><wbr>(<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="../../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a> target)</code></div>
<divclass="block">Set the entity that you want the mob to target instead.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-org.bukkit.event.entity.EntityEvent">Methods inherited from class org.bukkit.event.entity.<ahref="EntityEvent.html"title="class in org.bukkit.event.entity">EntityEvent</a></h3>
<h3id="methods-inherited-from-class-org.bukkit.event.Event">Methods inherited from class org.bukkit.event.<ahref="../Event.html"title="class in org.bukkit.event">Event</a></h3>
<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#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</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#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</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#toString()"title="class or interface in java.lang"class="external-link">toString</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">EntityTargetEvent</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/Entity.html"title="interface in org.bukkit.entity">Entity</a> entity,
<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/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a> target,
<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="EntityTargetEvent.TargetReason.html"title="enum class in org.bukkit.event.entity">EntityTargetEvent.TargetReason</a> reason)</span></div>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="../Cancellable.html#isCancelled()">Cancellable</a></code></span></div>
<divclass="block">Gets the cancellation state of this event. A cancelled event will not
be executed in the server, but will still pass to other plugins</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../Cancellable.html#isCancelled()">isCancelled</a></code> in interface <code><ahref="../Cancellable.html"title="interface in org.bukkit.event">Cancellable</a></code></dd>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="../Cancellable.html#setCancelled(boolean)">Cancellable</a></code></span></div>
<divclass="block">Sets the cancellation state of this event. A cancelled event will not
be executed in the server, but will still pass to other plugins.</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../Cancellable.html#setCancelled(boolean)">setCancelled</a></code> in interface <code><ahref="../Cancellable.html"title="interface in org.bukkit.event">Cancellable</a></code></dd>
<dt>Parameters:</dt>
<dd><code>cancel</code> - true if you wish to cancel this event</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getReason()">
<h3>getReason</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="EntityTargetEvent.TargetReason.html"title="enum class in org.bukkit.event.entity">EntityTargetEvent.TargetReason</a></span> <spanclass="element-name">getReason</span>()</div>
<divclass="block">Returns the reason for the targeting</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>The reason</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getTarget()">
<h3>getTarget</h3>
<divclass="member-signature"><spanclass="annotations"><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>
</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="../../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a></span> <spanclass="element-name">getTarget</span>()</div>
<divclass="block">Get the entity that this is targeting.
<p>
This will be null in the case that the event is called when the mob
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">void</span> <spanclass="element-name">setTarget</span><wbr><spanclass="parameters">(<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/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a> target)</span></div>
<divclass="block">Set the entity that you want the mob to target instead.
<p>
It is possible to be null, null will cause the entity to be
target-less.
<p>
This is different from cancelling the event. Cancelling the event will
cause the entity to keep an original target, while setting to be null
will cause the entity to be reset.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>target</code> - The entity to target</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getHandlers()">
<h3>getHandlers</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="../HandlerList.html"title="class in org.bukkit.event">HandlerList</a></span> <spanclass="element-name">getHandlers</span>()</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../Event.html#getHandlers()">getHandlers</a></code> in class <code><ahref="../Event.html"title="class in org.bukkit.event">Event</a></code></dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getHandlerList()">
<h3>getHandlerList</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 static</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="../HandlerList.html"title="class in org.bukkit.event">HandlerList</a></span> <spanclass="element-name">getHandlerList</span>()</div>