<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#copy(org.bukkit.structure.Structure)"class="member-name-link">copy</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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</code></div>
<divclass="block">Creates a copy of this structure.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#deleteStructure(org.bukkit.NamespacedKey)"class="member-name-link">deleteStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</code></div>
<divclass="block">Unregisters the specified structure and deletes its <ahref="#getStructureFile(org.bukkit.NamespacedKey)"><code>structure file</code></a> from the primary world
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#deleteStructure(org.bukkit.NamespacedKey,boolean)"class="member-name-link">deleteStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
<divclass="block">Deletes the <ahref="#getStructureFile(org.bukkit.NamespacedKey)"><code>structure file</code></a> for
the specified structure from the primary world folder.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#getStructure(org.bukkit.NamespacedKey)"class="member-name-link">getStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</code></div>
<divclass="block">Gets a registered Structure.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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/io/File.html"title="class or interface in java.io"class="external-link">File</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#getStructureFile(org.bukkit.NamespacedKey)"class="member-name-link">getStructureFile</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a>,<wbr><ahref="Structure.html"title="interface in org.bukkit.structure">Structure</a>></code></div>
<divclass="block">Gets the currently registered structures.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#loadStructure(java.io.File)"class="member-name-link">loadStructure</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/io/File.html"title="class or interface in java.io"class="external-link">File</a> file)</code></div>
<divclass="block">Reads a Structure from disk.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#loadStructure(java.io.InputStream)"class="member-name-link">loadStructure</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/io/InputStream.html"title="class or interface in java.io"class="external-link">InputStream</a> inputStream)</code></div>
<divclass="block">Reads a Structure from a stream.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#loadStructure(org.bukkit.NamespacedKey)"class="member-name-link">loadStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</code></div>
<divclass="block">Loads the structure for the specified key and automatically registers it.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#loadStructure(org.bukkit.NamespacedKey,boolean)"class="member-name-link">loadStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
<divclass="block">Loads a structure for the specified key and optionally <ahref="#registerStructure(org.bukkit.NamespacedKey,org.bukkit.structure.Structure)"><code>registers</code></a> it.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#registerStructure(org.bukkit.NamespacedKey,org.bukkit.structure.Structure)"class="member-name-link">registerStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#saveStructure(java.io.File,org.bukkit.structure.Structure)"class="member-name-link">saveStructure</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/io/File.html"title="class or interface in java.io"class="external-link">File</a> file,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#saveStructure(java.io.OutputStream,org.bukkit.structure.Structure)"class="member-name-link">saveStructure</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/io/OutputStream.html"title="class or interface in java.io"class="external-link">OutputStream</a> outputStream,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#saveStructure(org.bukkit.NamespacedKey)"class="member-name-link">saveStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#saveStructure(org.bukkit.NamespacedKey,org.bukkit.structure.Structure)"class="member-name-link">saveStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</code></div>
<divclass="block">Saves a structure with a given key to the primary world folder.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="Structure.html"title="interface in org.bukkit.structure">Structure</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#unregisterStructure(org.bukkit.NamespacedKey)"class="member-name-link">unregisterStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</code></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="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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a>,<wbr><ahref="Structure.html"title="interface in org.bukkit.structure">Structure</a>></span> <spanclass="element-name">getStructures</span>()</div>
<divclass="block">Gets the currently registered structures.
<p>
These are the currently loaded structures that the StructureManager is
aware of. When a structure block refers to a structure, these structures
are checked first. If the specified structure is not found among the
currently registered structures, the StructureManager may dynamically
read the structure from the primary world folder, DataPacks, or the
server's own resources. Structures can be registered via <ahref="#registerStructure(org.bukkit.NamespacedKey,org.bukkit.structure.Structure)"><code>registerStructure(NamespacedKey, Structure)</code></a></div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>an unmodifiable shallow copy of the currently registered
<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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">getStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</span></div>
<divclass="block">Gets a registered Structure.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key for which to get the structure</dd>
<dt>Returns:</dt>
<dd>The structure that belongs to the structureKey or
<code>null</code> if there is none registered for that key.</dd>
<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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">registerStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</span></div>
<divclass="block">Registers the given structure. See <ahref="#getStructures()"><code>getStructures()</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key for which to register the structure</dd>
<dd><code>structure</code> - The structure to register</dd>
<dt>Returns:</dt>
<dd>The structure for the specified key, or <code>null</code> if the
<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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">unregisterStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</span></div>
<divclass="block">Unregisters a structure. Unregisters the specified structure. If the
structure still exists in the primary world folder, a DataPack, or is
part of the server's own resources, it may be loaded and registered again
when it is requested by a plugin or the server itself.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key for which to save the structure for</dd>
<dt>Returns:</dt>
<dd>The structure that was registered for that key or
<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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">loadStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
boolean register)</span></div>
<divclass="block">Loads a structure for the specified key and optionally <ahref="#registerStructure(org.bukkit.NamespacedKey,org.bukkit.structure.Structure)"><code>registers</code></a> it.
<p>
This will first check the already loaded <ahref="#getStructures()"><code>registered structures</code></a>, and otherwise load the structure from the primary
world folder, DataPacks, and the server's own resources (in this order).
<p>
When loading the structure from the primary world folder, the given key
<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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">loadStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</span></div>
<divclass="block">Loads the structure for the specified key and automatically registers it.
See <ahref="#loadStructure(org.bukkit.NamespacedKey,boolean)"><code>loadStructure(NamespacedKey, boolean)</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key for which to load the structure</dd>
<dt>Returns:</dt>
<dd>The structure for the specified key, or <code>null</code> if the
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">saveStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</span></div>
<divclass="block">Saves the currently <ahref="#getStructures()"><code>registered structure</code></a> for the
specified <ahref="../NamespacedKey.html"title="class in org.bukkit"><code>key</code></a> to the primary world folder as
specified by {#getStructureFile(NamespacedKey}.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key for which to save the structure for</dd>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">saveStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Saves a structure with a given key to the primary world folder.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key for which to save the structure for</dd>
<dd><code>structure</code> - The structure to save for this structureKey</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code></dd>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">deleteStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Unregisters the specified structure and deletes its <ahref="#getStructureFile(org.bukkit.NamespacedKey)"><code>structure file</code></a> from the primary world
folder. Note that this method cannot be used to delete vanilla Minecraft
structures, or structures from DataPacks. Unregistering these structures
will however work fine.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key of the structure to remove</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - If the file could not be removed for some reason.</dd>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">deleteStructure</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey,
boolean unregister)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Deletes the <ahref="#getStructureFile(org.bukkit.NamespacedKey)"><code>structure file</code></a> for
the specified structure from the primary world folder. Note that this
method cannot be used to delete vanilla Minecraft structures, or
structures from DataPacks. Unregistering these structures will however
work fine.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key of the structure to remove</dd>
<dd><code>unregister</code> - Whether to also unregister the specified structure if
it is currently loaded.</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - If the file could not be removed for some reason.</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="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/io/File.html"title="class or interface in java.io"class="external-link">File</a></span> <spanclass="element-name">getStructureFile</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="../NamespacedKey.html"title="class in org.bukkit">NamespacedKey</a> structureKey)</span></div>
<divclass="block">Gets the location where a structure file would exist in the primary world
directory based on the NamespacedKey using the format
world/generated/{NAMESPACE}/structures/{KEY}.nbt. This method will always
return a file, even if none exists at the moment.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structureKey</code> - The key to build the filepath from.</dd>
<dt>Returns:</dt>
<dd>The location where a file with this key would be.</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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">loadStructure</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/io/File.html"title="class or interface in java.io"class="external-link">File</a> file)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Reads a Structure from disk.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>file</code> - The file of the structure</dd>
<dt>Returns:</dt>
<dd>The read structure</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - when the given file can not be read 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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">loadStructure</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/io/InputStream.html"title="class or interface in java.io"class="external-link">InputStream</a> inputStream)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Reads a Structure from a stream.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>inputStream</code> - The file of the structure</dd>
<dt>Returns:</dt>
<dd>The read Structure</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code></dd>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">saveStructure</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/io/File.html"title="class or interface in java.io"class="external-link">File</a> file,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Save a structure to a file. This will overwrite a file if it already
exists.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>file</code> - the target to save to.</dd>
<dd><code>structure</code> - the Structure to save.</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - when the given file can not be written to.</dd>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">saveStructure</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/io/OutputStream.html"title="class or interface in java.io"class="external-link">OutputStream</a> outputStream,
<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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></span></div>
<divclass="block">Save a structure to a stream.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>outputStream</code> - the stream to write to.</dd>
<dd><code>structure</code> - the Structure to save.</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html"title="class or interface in java.io"class="external-link">IOException</a></code> - when the given file can not be written to.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="createStructure()">
<h3>createStructure</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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">createStructure</span>()</div>
<divclass="block">Creates a new empty structure.</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="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="Structure.html"title="interface in org.bukkit.structure">Structure</a></span> <spanclass="element-name">copy</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="Structure.html"title="interface in org.bukkit.structure">Structure</a> structure)</span></div>
<divclass="block">Creates a copy of this structure.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>structure</code> - The structure to copy</dd>