mirror of
https://github.com/AtlasMediaGroup/Scissors-Website.git
synced 2024-12-28 21:07:38 +00:00
393 lines
34 KiB
HTML
393 lines
34 KiB
HTML
<!DOCTYPE HTML>
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (17) -->
|
|
<title>PersistentDataContainer (Scissors-API 1.18.2-R0.1-SNAPSHOT API)</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="description" content="declaration: package: org.bukkit.persistence, interface: PersistentDataContainer">
|
|
<meta name="generator" content="javadoc/ClassWriterImpl">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
|
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body class="class-declaration-page">
|
|
<script type="text/javascript">var evenRowColor = "even-row-color";
|
|
var oddRowColor = "odd-row-color";
|
|
var tableTab = "table-tab";
|
|
var activeTableTab = "active-table-tab";
|
|
var pathtoroot = "../../../";
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<div class="flex-box">
|
|
<header role="banner" class="flex-header">
|
|
<nav role="navigation">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="top-nav" id="navbar-top">
|
|
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
|
<li><a href="../../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="nav-bar-cell1-rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html#class">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="sub-nav">
|
|
<div>
|
|
<ul class="sub-nav-list">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method-summary">Method</a></li>
|
|
</ul>
|
|
<ul class="sub-nav-list">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method-detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
|
<input type="text" id="search-input" value="search" disabled="disabled">
|
|
<input type="reset" id="reset-button" value="reset" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
|
</header>
|
|
<div class="flex-content">
|
|
<main role="main">
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.bukkit.persistence</a></div>
|
|
<h1 title="Interface PersistentDataContainer" class="title">Interface PersistentDataContainer</h1>
|
|
</div>
|
|
<section class="class-description" id="class-description">
|
|
<hr>
|
|
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">PersistentDataContainer</span></div>
|
|
<div class="block">This interface represents a map like object, capable of storing custom tags
|
|
in it.</div>
|
|
</section>
|
|
<section class="summary">
|
|
<ul class="summary-list">
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<li>
|
|
<section class="method-summary" id="method-summary">
|
|
<h2>Method Summary</h2>
|
|
<div id="method-summary-table">
|
|
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div>
|
|
<div id="method-summary-table.tabpanel" role="tabpanel">
|
|
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
|
|
<div class="table-header col-first">Modifier and Type</div>
|
|
<div class="table-header col-second">Method</div>
|
|
<div class="table-header col-last">Description</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><T,<wbr>
|
|
Z> Z</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#get(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType)" class="member-name-link">get</a><wbr>(<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Returns the metadata value that is stored on the
|
|
<a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="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> <a href="PersistentDataAdapterContext.html" title="interface in org.bukkit.persistence">PersistentDataAdapterContext</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getAdapterContext()" class="member-name-link">getAdapterContext</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Returns the adapter context this tag container uses.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="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> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a>></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getKeys()" class="member-name-link">getKeys</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Get a set of keys present on this <a href="PersistentDataContainer.html" title="interface in org.bukkit.persistence"><code>PersistentDataContainer</code></a>
|
|
instance.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><T,<wbr>
|
|
Z> Z</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getOrDefault(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType,Z)" class="member-name-link">getOrDefault</a><wbr>(<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type,
|
|
Z defaultValue)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Returns the metadata value that is stored on the
|
|
<a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#has(org.bukkit.NamespacedKey)" class="member-name-link">has</a><wbr>(<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Returns if the persistent metadata provider has metadata registered
|
|
matching the provided key.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><T,<wbr>
|
|
Z> boolean</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#has(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType)" class="member-name-link">has</a><wbr>(<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Returns if the persistent metadata provider has metadata registered
|
|
matching the provided parameters.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isEmpty()" class="member-name-link">isEmpty</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Returns if the container instance is empty, therefore has no entries
|
|
inside it.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#remove(org.bukkit.NamespacedKey)" class="member-name-link">remove</a><wbr>(<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Removes a custom key from the <a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><T,<wbr>
|
|
Z> void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#set(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType,Z)" class="member-name-link">set</a><wbr>(<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type,
|
|
Z value)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Stores a metadata value on the <a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="details">
|
|
<ul class="details-list">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<li>
|
|
<section class="method-details" id="method-detail">
|
|
<h2>Method Details</h2>
|
|
<ul class="member-list">
|
|
<li>
|
|
<section class="detail" id="set(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType,Z)">
|
|
<h3 id="set(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType,java.lang.Object)">set</h3>
|
|
<div class="member-signature"><span class="type-parameters"><T,<wbr>
|
|
Z></span> <span class="return-type">void</span> <span class="element-name">set</span><wbr><span class="parameters">(<a href="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>
|
|
<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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>
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type,
|
|
<a href="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>
|
|
Z value)</span></div>
|
|
<div class="block">Stores a metadata value on the <a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.
|
|
<p>
|
|
This API cannot be used to manipulate minecraft data, as the values will
|
|
be stored using your namespace. This method will override any existing
|
|
value the <a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> may have stored under the provided
|
|
key.</div>
|
|
<dl class="notes">
|
|
<dt>Type Parameters:</dt>
|
|
<dd><code>T</code> - the generic java type of the tag value</dd>
|
|
<dd><code>Z</code> - the generic type of the object to store</dd>
|
|
<dt>Parameters:</dt>
|
|
<dd><code>key</code> - the key this value will be stored under</dd>
|
|
<dd><code>type</code> - the type this tag uses</dd>
|
|
<dd><code>value</code> - the value stored in the tag</dd>
|
|
<dt>Throws:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the key is null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the type is null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the value is null. Removing a tag should
|
|
be done using <a href="#remove(org.bukkit.NamespacedKey)"><code>remove(NamespacedKey)</code></a></dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if no suitable adapter will be found for
|
|
the <a href="PersistentDataType.html#getPrimitiveType()"><code>PersistentDataType.getPrimitiveType()</code></a></dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="has(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType)">
|
|
<h3>has</h3>
|
|
<div class="member-signature"><span class="type-parameters"><T,<wbr>
|
|
Z></span> <span class="return-type">boolean</span> <span class="element-name">has</span><wbr><span class="parameters">(<a href="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>
|
|
<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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>
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type)</span></div>
|
|
<div class="block">Returns if the persistent metadata provider has metadata registered
|
|
matching the provided parameters.
|
|
<p>
|
|
This method will only return if the found value has the same primitive
|
|
data type as the provided key.
|
|
<p>
|
|
Storing a value using a custom <a href="PersistentDataType.html" title="interface in org.bukkit.persistence"><code>PersistentDataType</code></a> implementation
|
|
will not store the complex data type. Therefore storing a UUID (by
|
|
storing a byte[]) will match has("key" ,
|
|
<a href="PersistentDataType.html#BYTE_ARRAY"><code>PersistentDataType.BYTE_ARRAY</code></a>). Likewise a stored byte[] will
|
|
always match your UUID <a href="PersistentDataType.html" title="interface in org.bukkit.persistence"><code>PersistentDataType</code></a> even if it is not 16
|
|
bytes long.
|
|
<p>
|
|
This method is only usable for custom object keys. Overwriting existing
|
|
tags, like the the display name, will not work as the values are stored
|
|
using your namespace.</div>
|
|
<dl class="notes">
|
|
<dt>Type Parameters:</dt>
|
|
<dd><code>T</code> - the generic type of the stored primitive</dd>
|
|
<dd><code>Z</code> - the generic type of the eventually created complex object</dd>
|
|
<dt>Parameters:</dt>
|
|
<dd><code>key</code> - the key the value is stored under</dd>
|
|
<dd><code>type</code> - the type which primitive storage type has to match the value</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>if a value</dd>
|
|
<dt>Throws:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the key to look up is null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the type to cast the found object to is
|
|
null</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="get(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType)">
|
|
<h3>get</h3>
|
|
<div class="member-signature"><span class="annotations"><a href="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><span class="type-parameters"><T,<wbr>
|
|
Z></span> <span class="return-type">Z</span> <span class="element-name">get</span><wbr><span class="parameters">(<a href="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>
|
|
<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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>
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type)</span></div>
|
|
<div class="block">Returns the metadata value that is stored on the
|
|
<a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.</div>
|
|
<dl class="notes">
|
|
<dt>Type Parameters:</dt>
|
|
<dd><code>T</code> - the generic type of the stored primitive</dd>
|
|
<dd><code>Z</code> - the generic type of the eventually created complex object</dd>
|
|
<dt>Parameters:</dt>
|
|
<dd><code>key</code> - the key to look up in the custom tag map</dd>
|
|
<dd><code>type</code> - the type the value must have and will be casted to</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>the value or <code>null</code> if no value was mapped under the given
|
|
value</dd>
|
|
<dt>Throws:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the key to look up is null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the type to cast the found object to is
|
|
null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the value exists under the given key,
|
|
but cannot be access using the given type</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if no suitable adapter will be found for
|
|
the <a href="PersistentDataType.html#getPrimitiveType()"><code>PersistentDataType.getPrimitiveType()</code></a></dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getOrDefault(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType,Z)">
|
|
<h3 id="getOrDefault(org.bukkit.NamespacedKey,org.bukkit.persistence.PersistentDataType,java.lang.Object)">getOrDefault</h3>
|
|
<div class="member-signature"><span class="annotations"><a href="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><span class="type-parameters"><T,<wbr>
|
|
Z></span> <span class="return-type">Z</span> <span class="element-name">getOrDefault</span><wbr><span class="parameters">(<a href="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>
|
|
<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key,
|
|
<a href="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>
|
|
<a href="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> <a href="PersistentDataType.html" title="interface in org.bukkit.persistence">PersistentDataType</a><T,<wbr>Z> type,
|
|
<a href="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>
|
|
Z defaultValue)</span></div>
|
|
<div class="block">Returns the metadata value that is stored on the
|
|
<a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance. If the value does not exist in the
|
|
container, the default value provided is returned.</div>
|
|
<dl class="notes">
|
|
<dt>Type Parameters:</dt>
|
|
<dd><code>T</code> - the generic type of the stored primitive</dd>
|
|
<dd><code>Z</code> - the generic type of the eventually created complex object</dd>
|
|
<dt>Parameters:</dt>
|
|
<dd><code>key</code> - the key to look up in the custom tag map</dd>
|
|
<dd><code>type</code> - the type the value must have and will be casted to</dd>
|
|
<dd><code>defaultValue</code> - the default value to return if no value was found for
|
|
the provided key</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>the value or the default value if no value was mapped under the
|
|
given value</dd>
|
|
<dt>Throws:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the key to look up is null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the type to cast the found object to is
|
|
null</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the value exists under the given key,
|
|
but cannot be access using the given type</dd>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if no suitable adapter will be found for
|
|
the <a href="PersistentDataType.html#getPrimitiveType()"><code>PersistentDataType.getPrimitiveType()</code></a></dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getKeys()">
|
|
<h3>getKeys</h3>
|
|
<div class="member-signature"><span class="annotations"><a href="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><span class="return-type"><a href="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> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a>></span> <span class="element-name">getKeys</span>()</div>
|
|
<div class="block">Get a set of keys present on this <a href="PersistentDataContainer.html" title="interface in org.bukkit.persistence"><code>PersistentDataContainer</code></a>
|
|
instance.
|
|
|
|
Any changes made to the returned set will not be reflected on the
|
|
instance.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>the key set</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="remove(org.bukkit.NamespacedKey)">
|
|
<h3>remove</h3>
|
|
<div class="member-signature"><span class="return-type">void</span> <span class="element-name">remove</span><wbr><span class="parameters">(<a href="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>
|
|
<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key)</span></div>
|
|
<div class="block">Removes a custom key from the <a href="PersistentDataHolder.html" title="interface in org.bukkit.persistence"><code>PersistentDataHolder</code></a> instance.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>key</code> - the key</dd>
|
|
<dt>Throws:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the provided key is null</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="isEmpty()">
|
|
<h3>isEmpty</h3>
|
|
<div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isEmpty</span>()</div>
|
|
<div class="block">Returns if the container instance is empty, therefore has no entries
|
|
inside it.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>the boolean</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getAdapterContext()">
|
|
<h3>getAdapterContext</h3>
|
|
<div class="member-signature"><span class="annotations"><a href="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><span class="return-type"><a href="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> <a href="PersistentDataAdapterContext.html" title="interface in org.bukkit.persistence">PersistentDataAdapterContext</a></span> <span class="element-name">getAdapterContext</span>()</div>
|
|
<div class="block">Returns the adapter context this tag container uses.</div>
|
|
<dl class="notes">
|
|
<dt>Returns:</dt>
|
|
<dd>the tag context</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="has(org.bukkit.NamespacedKey)">
|
|
<h3>has</h3>
|
|
<div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">has</span><wbr><span class="parameters">(<a href="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>
|
|
<a href="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> <a href="../NamespacedKey.html" title="class in org.bukkit">NamespacedKey</a> key)</span></div>
|
|
<div class="block">Returns if the persistent metadata provider has metadata registered
|
|
matching the provided key.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>key</code> - the key for which existence should be checked.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>whether the key exists</dd>
|
|
<dt>Throws:</dt>
|
|
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">NullPointerException</a></code> - if the key to look up is null</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|