<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="MetadataValueAdapter.html"title="class in org.bukkit.metadata">org.bukkit.metadata.MetadataValueAdapter</a>
<dd><code><ahref="MetadataValue.html"title="interface in org.bukkit.metadata">MetadataValue</a></code></dd>
</dl>
<dlclass="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><ahref="FixedMetadataValue.html"title="class in org.bukkit.metadata">FixedMetadataValue</a></code></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public class </span><spanclass="element-name type-name-label">LazyMetadataValue</span>
<spanclass="extends-implements">extends <ahref="MetadataValueAdapter.html"title="class in org.bukkit.metadata">MetadataValueAdapter</a></span></div>
<divclass="block">The LazyMetadataValue class implements a type of metadata that is not
computed until another plugin asks for it.
<p>
By making metadata values lazy, no computation is done by the providing
plugin until absolutely necessary (if ever). Additionally,
LazyMetadataValue objects cache their values internally unless overridden
by a <ahref="LazyMetadataValue.CacheStrategy.html"title="enum class in org.bukkit.metadata"><code>LazyMetadataValue.CacheStrategy</code></a> or invalidated at the individual or plugin
level. Once invalidated, the LazyMetadataValue will recompute its value
<divclass="col-second even-row-color"><code><ahref="LazyMetadataValue.CacheStrategy.html"class="type-name-link"title="enum class in org.bukkit.metadata">LazyMetadataValue.CacheStrategy</a></code></div>
<divclass="col-last even-row-color">
<divclass="block">Describes possible caching strategies for metadata.</div>
</div>
</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.metadata.MetadataValueAdapter">Fields inherited from class org.bukkit.metadata.<ahref="MetadataValueAdapter.html"title="class in org.bukkit.metadata">MetadataValueAdapter</a></h3>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.plugin.Plugin)"class="member-name-link">LazyMetadataValue</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="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> owningPlugin)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Protected special constructor used by FixedMetadataValue to bypass
<divclass="col-constructor-name odd-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.plugin.Plugin,java.util.concurrent.Callable)"class="member-name-link">LazyMetadataValue</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="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> owningPlugin,
<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/concurrent/Callable.html"title="class or interface in java.util.concurrent"class="external-link">Callable</a><<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>> lazyValue)</code></div>
<divclass="col-last odd-row-color">
<divclass="block">Initialized a LazyMetadataValue object with the default
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.plugin.Plugin,org.bukkit.metadata.LazyMetadataValue.CacheStrategy,java.util.concurrent.Callable)"class="member-name-link">LazyMetadataValue</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="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> owningPlugin,
<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="LazyMetadataValue.CacheStrategy.html"title="enum class in org.bukkit.metadata">LazyMetadataValue.CacheStrategy</a> cacheStrategy,
<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/concurrent/Callable.html"title="class or interface in java.util.concurrent"class="external-link">Callable</a><<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>> lazyValue)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Initializes a LazyMetadataValue object with a specific cache strategy.</div>
<divclass="block">Invalidates this metadata item, forcing it to recompute when next
accessed.</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="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">Fetches the value of this metadata item.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-org.bukkit.metadata.MetadataValueAdapter">Methods inherited from class org.bukkit.metadata.<ahref="MetadataValueAdapter.html"title="class in org.bukkit.metadata">MetadataValueAdapter</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">LazyMetadataValue</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="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> owningPlugin,
<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/concurrent/Callable.html"title="class or interface in java.util.concurrent"class="external-link">Callable</a><<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>> lazyValue)</span></div>
<divclass="block">Initialized a LazyMetadataValue object with the default
CACHE_AFTER_FIRST_EVAL cache strategy.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>owningPlugin</code> - the <ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin"><code>Plugin</code></a> that created this metadata
value.</dd>
<dd><code>lazyValue</code> - the lazy value assigned to this metadata value.</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">LazyMetadataValue</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="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> owningPlugin,
<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="LazyMetadataValue.CacheStrategy.html"title="enum class in org.bukkit.metadata">LazyMetadataValue.CacheStrategy</a> cacheStrategy,
<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/concurrent/Callable.html"title="class or interface in java.util.concurrent"class="external-link">Callable</a><<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>> lazyValue)</span></div>
<divclass="block">Initializes a LazyMetadataValue object with a specific cache strategy.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>owningPlugin</code> - the <ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin"><code>Plugin</code></a> that created this metadata
value.</dd>
<dd><code>cacheStrategy</code> - determines the rules for caching this metadata
value.</dd>
<dd><code>lazyValue</code> - the lazy value assigned to this metadata value.</dd>
<divclass="member-signature"><spanclass="modifiers">protected</span> <spanclass="element-name">LazyMetadataValue</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="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> owningPlugin)</span></div>
<divclass="block">Protected special constructor used by FixedMetadataValue to bypass
standard setup.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>owningPlugin</code> - the owning plugin</dd>
</dl>
</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="value()">
<h3>value</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="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">value</span>()</div>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="MetadataValue.html#value()">MetadataValue</a></code></span></div>
<divclass="block">Fetches the value of this metadata item.</div>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="MetadataValue.html#invalidate()">MetadataValue</a></code></span></div>
<divclass="block">Invalidates this metadata item, forcing it to recompute when next