683 Zeilen
37 KiB
HTML
683 Zeilen
37 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_13) on Tue Mar 05 17:05:45 CET 2013 -->
|
|
<title>NbtFactory</title>
|
|
<meta name="date" content="2013-03-05">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="NbtFactory";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/NbtFactory.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/comphenix/protocol/wrappers/nbt/NbtFactory.html" target="_top">Frames</a></li>
|
|
<li><a href="NbtFactory.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.comphenix.protocol.wrappers.nbt</div>
|
|
<h2 title="Class NbtFactory" class="title">Class NbtFactory</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.comphenix.protocol.wrappers.nbt.NbtFactory</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="strong">NbtFactory</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">Factory methods for creating NBT elements, lists and compounds.</div>
|
|
<dl><dt><span class="strong">Author:</span></dt>
|
|
<dd>Kristian</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#NbtFactory()">NbtFactory</a></strong>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtCompound</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#asCompound(com.comphenix.protocol.wrappers.nbt.NbtBase)">asCompound</a></strong>(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><?> tag)</code>
|
|
<div class="block">Attempt to cast this NBT tag as a compund.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtList</a><?></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#asList(com.comphenix.protocol.wrappers.nbt.NbtBase)">asList</a></strong>(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><?> tag)</code>
|
|
<div class="block">Attempt to cast this NBT tag as a list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#fromBase(com.comphenix.protocol.wrappers.nbt.NbtBase)">fromBase</a></strong>(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><T> base)</code>
|
|
<div class="block">Get a NBT wrapper from a NBT base.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><?></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#fromItemTag(org.bukkit.inventory.ItemStack)">fromItemTag</a></strong>(org.bukkit.inventory.ItemStack stack)</code>
|
|
<div class="block">Construct a wrapper for an NBT tag stored (in memory) in an item stack.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#fromNMS(java.lang.Object)">fromNMS</a></strong>(java.lang.Object handle)</code>
|
|
<div class="block">Initialize a NBT wrapper.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Byte></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, byte)">of</a></strong>(java.lang.String name,
|
|
byte value)</code>
|
|
<div class="block">Constructs a NBT tag of type byte.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><byte[]></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, byte[])">of</a></strong>(java.lang.String name,
|
|
byte[] value)</code>
|
|
<div class="block">Constructs a NBT tag of type byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Double></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, double)">of</a></strong>(java.lang.String name,
|
|
double value)</code>
|
|
<div class="block">Constructs a NBT tag of type double.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Float></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, float)">of</a></strong>(java.lang.String name,
|
|
float value)</code>
|
|
<div class="block">Constructs a NBT tag of type float.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Integer></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, int)">of</a></strong>(java.lang.String name,
|
|
int value)</code>
|
|
<div class="block">Constructs a NBT tag of type int.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><int[]></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, int[])">of</a></strong>(java.lang.String name,
|
|
int[] value)</code>
|
|
<div class="block">Constructs a NBT tag of type int array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Long></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, long)">of</a></strong>(java.lang.String name,
|
|
long value)</code>
|
|
<div class="block">Constructs a NBT tag of type long.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Short></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, short)">of</a></strong>(java.lang.String name,
|
|
short value)</code>
|
|
<div class="block">Constructs a NBT tag of type short.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.String></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#of(java.lang.String, java.lang.String)">of</a></strong>(java.lang.String name,
|
|
java.lang.String value)</code>
|
|
<div class="block">Constructs a NBT tag of type string.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtCompound</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofCompound(java.lang.String)">ofCompound</a></strong>(java.lang.String name)</code>
|
|
<div class="block">Construct a new NBT compound wrapper.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtCompound</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofCompound(java.lang.String, java.util.Collection)">ofCompound</a></strong>(java.lang.String name,
|
|
java.util.Collection<? extends <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><?>> list)</code>
|
|
<div class="block">Construct a new NBT compound initialized with a given list of NBT values.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtList</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofList(java.lang.String, java.util.Collection)">ofList</a></strong>(java.lang.String name,
|
|
java.util.Collection<? extends T> elements)</code>
|
|
<div class="block">Construct a NBT list of out a list of values.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtList</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofList(java.lang.String, T...)">ofList</a></strong>(java.lang.String name,
|
|
T... elements)</code>
|
|
<div class="block">Construct a NBT list of out an array of values.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofWrapper(java.lang.Class, java.lang.String, T)">ofWrapper</a></strong>(java.lang.Class<?> type,
|
|
java.lang.String name,
|
|
T value)</code>
|
|
<div class="block">Create a new NBT wrapper from a given type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofWrapper(com.comphenix.protocol.wrappers.nbt.NbtType, java.lang.String)">ofWrapper</a></strong>(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtType.html" title="enum in com.comphenix.protocol.wrappers.nbt">NbtType</a> type,
|
|
java.lang.String name)</code>
|
|
<div class="block">Create a new NBT wrapper from a given type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtFactory.html#ofWrapper(com.comphenix.protocol.wrappers.nbt.NbtType, java.lang.String, T)">ofWrapper</a></strong>(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtType.html" title="enum in com.comphenix.protocol.wrappers.nbt">NbtType</a> type,
|
|
java.lang.String name,
|
|
T value)</code>
|
|
<div class="block">Create a new NBT wrapper from a given type.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="NbtFactory()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>NbtFactory</h4>
|
|
<pre>public NbtFactory()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="asCompound(com.comphenix.protocol.wrappers.nbt.NbtBase)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>asCompound</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtCompound</a> asCompound(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><?> tag)</pre>
|
|
<div class="block">Attempt to cast this NBT tag as a compund.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tag</code> - - the NBT tag to cast.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>This instance as a compound.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code>java.lang.UnsupportedOperationException</code> - If this is not a compound.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="asList(com.comphenix.protocol.wrappers.nbt.NbtBase)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>asList</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtList</a><?> asList(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><?> tag)</pre>
|
|
<div class="block">Attempt to cast this NBT tag as a list.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tag</code> - - the NBT tag to cast.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>This instance as a list.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code>java.lang.UnsupportedOperationException</code> - If this is not a list.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fromBase(com.comphenix.protocol.wrappers.nbt.NbtBase)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fromBase</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T> fromBase(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><T> base)</pre>
|
|
<div class="block">Get a NBT wrapper from a NBT base.
|
|
<p>
|
|
This may clone the content if the NbtBase is not a NbtWrapper.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>base</code> - - the base class.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>A NBT wrapper.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fromItemTag(org.bukkit.inventory.ItemStack)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fromItemTag</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><?> fromItemTag(org.bukkit.inventory.ItemStack stack)</pre>
|
|
<div class="block">Construct a wrapper for an NBT tag stored (in memory) in an item stack. This is where
|
|
auxillary data such as enchanting, name and lore is stored. It doesn't include the items
|
|
material, damage value or count.
|
|
<p>
|
|
The item stack must be a wrapper for a CraftItemStack. Use
|
|
<a href="../../../../../com/comphenix/protocol/utility/MinecraftReflection.html#getBukkitItemStack(org.bukkit.inventory.ItemStack)"><code>MinecraftReflection.getBukkitItemStack(ItemStack)</code></a> if not.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stack</code> - - the item stack.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>A wrapper for its NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fromNMS(java.lang.Object)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fromNMS</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T> fromNMS(java.lang.Object handle)</pre>
|
|
<div class="block">Initialize a NBT wrapper.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>handle</code> - - the underlying net.minecraft.server object to wrap.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>A NBT wrapper.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.String> of(java.lang.String name,
|
|
java.lang.String value)</pre>
|
|
<div class="block">Constructs a NBT tag of type string.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, byte)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Byte> of(java.lang.String name,
|
|
byte value)</pre>
|
|
<div class="block">Constructs a NBT tag of type byte.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, short)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Short> of(java.lang.String name,
|
|
short value)</pre>
|
|
<div class="block">Constructs a NBT tag of type short.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Integer> of(java.lang.String name,
|
|
int value)</pre>
|
|
<div class="block">Constructs a NBT tag of type int.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Long> of(java.lang.String name,
|
|
long value)</pre>
|
|
<div class="block">Constructs a NBT tag of type long.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Float> of(java.lang.String name,
|
|
float value)</pre>
|
|
<div class="block">Constructs a NBT tag of type float.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><java.lang.Double> of(java.lang.String name,
|
|
double value)</pre>
|
|
<div class="block">Constructs a NBT tag of type double.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><byte[]> of(java.lang.String name,
|
|
byte[] value)</pre>
|
|
<div class="block">Constructs a NBT tag of type byte array.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="of(java.lang.String, int[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>of</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><int[]> of(java.lang.String name,
|
|
int[] value)</pre>
|
|
<div class="block">Constructs a NBT tag of type int array.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of the tag.</dd><dd><code>value</code> - - value of the tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The constructed NBT tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofCompound(java.lang.String, java.util.Collection)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofCompound</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtCompound</a> ofCompound(java.lang.String name,
|
|
java.util.Collection<? extends <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtBase.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtBase</a><?>> list)</pre>
|
|
<div class="block">Construct a new NBT compound initialized with a given list of NBT values.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - the name of the compound wrapper.</dd><dd><code>list</code> - - the list of elements to add.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new wrapped NBT compound.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofCompound(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofCompound</h4>
|
|
<pre>public static <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtCompound</a> ofCompound(java.lang.String name)</pre>
|
|
<div class="block">Construct a new NBT compound wrapper.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - the name of the compound wrapper.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new wrapped NBT compound.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofList(java.lang.String,java.lang.Object[])">
|
|
<!-- -->
|
|
</a><a name="ofList(java.lang.String, T...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofList</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtList</a><T> ofList(java.lang.String name,
|
|
T... elements)</pre>
|
|
<div class="block">Construct a NBT list of out an array of values.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of this list.</dd><dd><code>elements</code> - - elements to add.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new filled NBT list.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofList(java.lang.String, java.util.Collection)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofList</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtList</a><T> ofList(java.lang.String name,
|
|
java.util.Collection<? extends T> elements)</pre>
|
|
<div class="block">Construct a NBT list of out a list of values.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - - name of this list.</dd><dd><code>elements</code> - - elements to add.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new filled NBT list.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofWrapper(com.comphenix.protocol.wrappers.nbt.NbtType, java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofWrapper</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T> ofWrapper(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtType.html" title="enum in com.comphenix.protocol.wrappers.nbt">NbtType</a> type,
|
|
java.lang.String name)</pre>
|
|
<div class="block">Create a new NBT wrapper from a given type.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - - the NBT type.</dd><dd><code>name</code> - - the name of the NBT tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new wrapped NBT tag.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - If we're unable to create the underlying tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofWrapper(com.comphenix.protocol.wrappers.nbt.NbtType,java.lang.String,java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="ofWrapper(com.comphenix.protocol.wrappers.nbt.NbtType, java.lang.String, T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofWrapper</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T> ofWrapper(<a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtType.html" title="enum in com.comphenix.protocol.wrappers.nbt">NbtType</a> type,
|
|
java.lang.String name,
|
|
T value)</pre>
|
|
<div class="block">Create a new NBT wrapper from a given type.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - - the NBT type.</dd><dd><code>name</code> - - the name of the NBT tag.</dd><dd><code>value</code> - - the value of the new tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new wrapped NBT tag.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - If we're unable to create the underlying tag.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="ofWrapper(java.lang.Class,java.lang.String,java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="ofWrapper(java.lang.Class, java.lang.String, T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>ofWrapper</h4>
|
|
<pre>public static <T> <a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtWrapper.html" title="interface in com.comphenix.protocol.wrappers.nbt">NbtWrapper</a><T> ofWrapper(java.lang.Class<?> type,
|
|
java.lang.String name,
|
|
T value)</pre>
|
|
<div class="block">Create a new NBT wrapper from a given type.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - - type of the NBT value.</dd><dd><code>name</code> - - the name of the NBT tag.</dd><dd><code>value</code> - - the value of the new tag.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The new wrapped NBT tag.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - If we're unable to create the underlying tag.</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - If the given class type is not valid NBT.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar_bottom">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/NbtFactory.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtCompound.html" title="interface in com.comphenix.protocol.wrappers.nbt"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../../com/comphenix/protocol/wrappers/nbt/NbtList.html" title="interface in com.comphenix.protocol.wrappers.nbt"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/comphenix/protocol/wrappers/nbt/NbtFactory.html" target="_top">Frames</a></li>
|
|
<li><a href="NbtFactory.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|