<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="../../../../../org/bukkit/event/Event.html"title="class in org.bukkit.event">org.bukkit.event.Event</a>
<divclass="inheritance"><ahref="../../../../../org/bukkit/event/world/WorldEvent.html"title="class in org.bukkit.event.world">org.bukkit.event.world.WorldEvent</a>
<dd><code><ahref="../../../../../org/bukkit/event/Cancellable.html"title="interface in org.bukkit.event">Cancellable</a></code></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public class </span><spanclass="element-name type-name-label">StructuresLocateEvent</span>
<spanclass="extends-implements">extends <ahref="../../../../../org/bukkit/event/world/WorldEvent.html"title="class in org.bukkit.event.world">WorldEvent</a>
implements <ahref="../../../../../org/bukkit/event/Cancellable.html"title="interface in org.bukkit.event">Cancellable</a></span></div>
<divclass="block">Called <b>before</b> a set of configured structures is located.
This happens when:
<ul>
<li>The /locate command is used.<br></li>
<li>An Eye of Ender is used.</li>
<li>An Explorer/Treasure Map is activated.</li>
<li>A dolphin swims to a treasure location.</li>
<li>A trade is done with a villager for a map.</li>
<li><ahref="../../../../../org/bukkit/World.html#locateNearestStructure(org.bukkit.Location,org.bukkit.StructureType,int,boolean)"><code>World.locateNearestStructure(Location, org.bukkit.StructureType, int, boolean)</code></a> is invoked.</li>
<divclass="col-first even-row-color"><code>static final record </code></div>
<divclass="col-second even-row-color"><code><ahref="StructuresLocateEvent.Result.html"class="type-name-link"title="class in io.papermc.paper.event.world">StructuresLocateEvent.Result</a></code></div>
<divclass="col-last even-row-color">
<divclass="block">Result for <ahref="StructuresLocateEvent.html"title="class in io.papermc.paper.event.world"><code>StructuresLocateEvent</code></a>.</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.World,org.bukkit.Location,java.util.List,int,boolean)"class="member-name-link">StructuresLocateEvent</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="../../../../../org/bukkit/World.html"title="interface in org.bukkit">World</a> world,
<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="../../../../../org/bukkit/Location.html"title="class in org.bukkit">Location</a> origin,
<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/List.html"title="class or interface in java.util"class="external-link">List</a><<ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure">ConfiguredStructure</a>> configuredStructures,
<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/List.html"title="class or interface in java.util"class="external-link">List</a><<ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure">ConfiguredStructure</a>></code></div>
<divclass="block">Gets a mutable list of ConfiguredStructures that are valid targets for the search.</div>
</div>
<divclass="col-first odd-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="../../../../../org/bukkit/event/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="../../../../../org/bukkit/event/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="../../../../../org/bukkit/Location.html"title="class in org.bukkit">Location</a></code></div>
<divclass="block">Gets the <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> from which the search is to be conducted.</div>
<divclass="block">Gets the search radius in which to attempt locating the structure.</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="StructuresLocateEvent.Result.html"title="class in io.papermc.paper.event.world">StructuresLocateEvent.Result</a></code></div>
<divclass="block">Gets the <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> and <ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure"><code>ConfiguredStructure</code></a> set as the result, if it was defined.</div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#setConfiguredStructures(java.util.List)"class="member-name-link">setConfiguredStructures</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/List.html"title="class or interface in java.util"class="external-link">List</a><<ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure">ConfiguredStructure</a>> configuredStructures)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#setResult(io.papermc.paper.event.world.StructuresLocateEvent.Result)"class="member-name-link">setResult</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="StructuresLocateEvent.Result.html"title="class in io.papermc.paper.event.world">StructuresLocateEvent.Result</a> result)</code></div>
<divclass="block">Sets the result <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> and <ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure"><code>ConfiguredStructure</code></a>.</div>
<divclass="block">Gets whether to search exclusively for unexplored structures.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-org.bukkit.event.world.WorldEvent">Methods inherited from class org.bukkit.event.world.<ahref="../../../../../org/bukkit/event/world/WorldEvent.html"title="class in org.bukkit.event.world">WorldEvent</a></h3>
<h3id="methods-inherited-from-class-org.bukkit.event.Event">Methods inherited from class org.bukkit.event.<ahref="../../../../../org/bukkit/event/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">StructuresLocateEvent</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="../../../../../org/bukkit/World.html"title="interface in org.bukkit">World</a> world,
<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="../../../../../org/bukkit/Location.html"title="class in org.bukkit">Location</a> origin,
<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/List.html"title="class or interface in java.util"class="external-link">List</a><<ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure">ConfiguredStructure</a>> configuredStructures,
int radius,
boolean findUnexplored)</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<sectionclass="method-details"id="method-detail">
<h2>Method Details</h2>
<ulclass="member-list">
<li>
<sectionclass="detail"id="getOrigin()">
<h3>getOrigin</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="../../../../../org/bukkit/Location.html"title="class in org.bukkit">Location</a></span> <spanclass="element-name">getOrigin</span>()</div>
<divclass="block">Gets the <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> from which the search is to be conducted.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd><ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> where search begins</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getResult()">
<h3>getResult</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="StructuresLocateEvent.Result.html"title="class in io.papermc.paper.event.world">StructuresLocateEvent.Result</a></span> <spanclass="element-name">getResult</span>()</div>
<divclass="block">Gets the <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> and <ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure"><code>ConfiguredStructure</code></a> set as the result, if it was defined.
<p>
Returns <code>null</code> if it has not been set by <ahref="#setResult(io.papermc.paper.event.world.StructuresLocateEvent.Result)"><code>setResult(Result)</code></a>.
Since this event fires <i>before</i> the search is done, the actual result is unknown at this point.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>The result location and structure, if it has been set. null if it has not.</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">void</span> <spanclass="element-name">setResult</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="StructuresLocateEvent.Result.html"title="class in io.papermc.paper.event.world">StructuresLocateEvent.Result</a> result)</span></div>
<divclass="block">Sets the result <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> and <ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure"><code>ConfiguredStructure</code></a>. This causes the search to be
skipped, and the result object passed here to be used as the result.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>result</code> - the <ahref="../../../../../org/bukkit/Location.html"title="class in org.bukkit"><code>Location</code></a> and <ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure"><code>ConfiguredStructure</code></a> of the search.</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="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html"title="class or interface in java.util"class="external-link">List</a><<ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure">ConfiguredStructure</a>></span> <spanclass="element-name">getConfiguredStructures</span>()</div>
<divclass="block">Gets a mutable list of ConfiguredStructures that are valid targets for the search.</div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">void</span> <spanclass="element-name">setConfiguredStructures</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/List.html"title="class or interface in java.util"class="external-link">List</a><<ahref="../../world/structure/ConfiguredStructure.html"title="class in io.papermc.paper.world.structure">ConfiguredStructure</a>> configuredStructures)</span></div>
<divclass="block">Sets the list of ConfiguredStructures that are valid targets for the search.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>configuredStructures</code> - a list of ConfiguredStructure targets</dd>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="../../../../../org/bukkit/event/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="../../../../../org/bukkit/event/Cancellable.html#isCancelled()">isCancelled</a></code> in interface <code><ahref="../../../../../org/bukkit/event/Cancellable.html"title="interface in org.bukkit.event">Cancellable</a></code></dd>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="../../../../../org/bukkit/event/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="../../../../../org/bukkit/event/Cancellable.html#setCancelled(boolean)">setCancelled</a></code> in interface <code><ahref="../../../../../org/bukkit/event/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="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="../../../../../org/bukkit/event/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="../../../../../org/bukkit/event/Event.html#getHandlers()">getHandlers</a></code> in class <code><ahref="../../../../../org/bukkit/event/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="../../../../../org/bukkit/event/HandlerList.html"title="class in org.bukkit.event">HandlerList</a></span> <spanclass="element-name">getHandlerList</span>()</div>