Archiviert
13
0
Dieses Repository wurde am 2021-01-06 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
ProtocolLib/Javadoc/com/comphenix/protocol/events/PacketContainer.html

502 Zeilen
21 KiB
HTML

2012-09-18 17:27:59 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
2012-09-18 18:41:24 +02:00
<!-- Generated by javadoc (version 1.7.0_07) on Tue Sep 18 18:41:10 CEST 2012 -->
2012-09-18 17:27:59 +02:00
<title>PacketContainer</title>
<meta name="date" content="2012-09-18">
<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="PacketContainer";
}
//-->
</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/PacketContainer.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/events/PacketAdapter.html" title="class in com.comphenix.protocol.events"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/comphenix/protocol/events/PacketEvent.html" title="class in com.comphenix.protocol.events"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/events/PacketContainer.html" target="_top">Frames</a></li>
<li><a href="PacketContainer.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.events</div>
<h2 title="Class PacketContainer" class="title">Class PacketContainer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.comphenix.protocol.events.PacketContainer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">PacketContainer</span>
extends java.lang.Object</pre>
<div class="block">Represents a Minecraft packet indirectly.</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">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected net.minecraft.server.Packet</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#handle">handle</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#id">id</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#structureModifier">structureModifier</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== 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">&nbsp;</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/events/PacketContainer.html#PacketContainer(int)">PacketContainer</a></strong>(int&nbsp;id)</code>
<div class="block">Creates a packet container for a new packet.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#PacketContainer(int, net.minecraft.server.Packet)">PacketContainer</a></strong>(int&nbsp;id,
net.minecraft.server.Packet&nbsp;handle)</code>
<div class="block">Creates a packet container for an existing packet.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#PacketContainer(int, net.minecraft.server.Packet, com.comphenix.protocol.reflect.StructureModifier)">PacketContainer</a></strong>(int&nbsp;id,
net.minecraft.server.Packet&nbsp;handle,
<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;java.lang.Object&gt;&nbsp;structure)</code>
<div class="block">Creates a packet container for an existing packet.</div>
</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">&nbsp;</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><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.entity.Entity&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getEntityModifier(org.bukkit.World)">getEntityModifier</a></strong>(org.bukkit.World&nbsp;world)</code>
<div class="block">Retrieves a read/write structure for entity objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>net.minecraft.server.Packet</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getHandle()">getHandle</a></strong>()</code>
<div class="block">Retrieves the underlying Minecraft packet.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getID()">getID</a></strong>()</code>
<div class="block">Retrieves the ID of this packet.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.inventory.ItemStack[]&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getItemArrayModifier()">getItemArrayModifier</a></strong>()</code>
<div class="block">Retrieves a read/write structure for arrays of ItemStacks.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.inventory.ItemStack&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getItemModifier()">getItemModifier</a></strong>()</code>
<div class="block">Retrieves a read/write structure for ItemStack.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getModifier()">getModifier</a></strong>()</code>
<div class="block">Retrieves the generic structure modifier for this packet.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getSpecificModifier(java.lang.Class)">getSpecificModifier</a></strong>(java.lang.Class&lt;T&gt;&nbsp;primitiveType)</code>
<div class="block">Retrieves a read/write structure for every field with the given type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.WorldType&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/events/PacketContainer.html#getWorldTypeModifier()">getWorldTypeModifier</a></strong>()</code>
<div class="block">Retrieves a read/write structure for the world type enum.</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&nbsp;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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="handle">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handle</h4>
<pre>protected&nbsp;net.minecraft.server.Packet handle</pre>
</li>
</ul>
<a name="id">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>id</h4>
<pre>protected&nbsp;int id</pre>
</li>
</ul>
<a name="structureModifier">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>structureModifier</h4>
<pre>protected&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;java.lang.Object&gt; structureModifier</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="PacketContainer(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PacketContainer</h4>
<pre>public&nbsp;PacketContainer(int&nbsp;id)</pre>
<div class="block">Creates a packet container for a new packet.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - - ID of the packet to create.</dd></dl>
</li>
</ul>
<a name="PacketContainer(int, net.minecraft.server.Packet)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PacketContainer</h4>
<pre>public&nbsp;PacketContainer(int&nbsp;id,
net.minecraft.server.Packet&nbsp;handle)</pre>
<div class="block">Creates a packet container for an existing packet.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - - ID of the given packet.</dd><dd><code>handle</code> - - contained packet.</dd></dl>
</li>
</ul>
<a name="PacketContainer(int, net.minecraft.server.Packet, com.comphenix.protocol.reflect.StructureModifier)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PacketContainer</h4>
<pre>public&nbsp;PacketContainer(int&nbsp;id,
net.minecraft.server.Packet&nbsp;handle,
<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;java.lang.Object&gt;&nbsp;structure)</pre>
<div class="block">Creates a packet container for an existing packet.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - - ID of the given packet.</dd><dd><code>handle</code> - - contained packet.</dd><dd><code>structure</code> - - structure modifier.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getHandle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHandle</h4>
<pre>public&nbsp;net.minecraft.server.Packet&nbsp;getHandle()</pre>
<div class="block">Retrieves the underlying Minecraft packet.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Underlying Minecraft packet.</dd></dl>
</li>
</ul>
<a name="getModifier()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getModifier</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;java.lang.Object&gt;&nbsp;getModifier()</pre>
<div class="block">Retrieves the generic structure modifier for this packet.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Structure modifier.</dd></dl>
</li>
</ul>
<a name="getSpecificModifier(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSpecificModifier</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;T&gt;&nbsp;getSpecificModifier(java.lang.Class&lt;T&gt;&nbsp;primitiveType)</pre>
<div class="block">Retrieves a read/write structure for every field with the given type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>primitiveType</code> - - the type to find.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A modifier for this specific type.</dd></dl>
</li>
</ul>
<a name="getItemModifier()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemModifier</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.inventory.ItemStack&gt;&nbsp;getItemModifier()</pre>
<div class="block">Retrieves a read/write structure for ItemStack.
<p>
This modifier will automatically marshall between the Bukkit ItemStack and the
internal Minecraft ItemStack.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A modifier for ItemStack fields.</dd></dl>
</li>
</ul>
<a name="getItemArrayModifier()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemArrayModifier</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.inventory.ItemStack[]&gt;&nbsp;getItemArrayModifier()</pre>
<div class="block">Retrieves a read/write structure for arrays of ItemStacks.
<p>
This modifier will automatically marshall between the Bukkit ItemStack and the
internal Minecraft ItemStack.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A modifier for ItemStack array fields.</dd></dl>
</li>
</ul>
<a name="getWorldTypeModifier()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWorldTypeModifier</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.WorldType&gt;&nbsp;getWorldTypeModifier()</pre>
<div class="block">Retrieves a read/write structure for the world type enum.
<p>
This modifier will automatically marshall between the Bukkit world type and the
internal Minecraft world type.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A modifier for world type fields.</dd></dl>
</li>
</ul>
<a name="getEntityModifier(org.bukkit.World)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntityModifier</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;org.bukkit.entity.Entity&gt;&nbsp;getEntityModifier(org.bukkit.World&nbsp;world)</pre>
<div class="block">Retrieves a read/write structure for entity objects.
<p>
Note that entities are transmitted by integer ID, and the type may not be enough
to distinguish between entities and other values. Thus, this structure modifier
MAY return null or invalid entities for certain fields. Using the correct index
is essential.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A modifier entity types.</dd></dl>
</li>
</ul>
<a name="getID()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getID</h4>
<pre>public&nbsp;int&nbsp;getID()</pre>
<div class="block">Retrieves the ID of this packet.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Packet ID.</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/PacketContainer.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/events/PacketAdapter.html" title="class in com.comphenix.protocol.events"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/comphenix/protocol/events/PacketEvent.html" title="class in com.comphenix.protocol.events"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/events/PacketContainer.html" target="_top">Frames</a></li>
<li><a href="PacketContainer.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>