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/ProtocolManager.html

443 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-10-05 04:45:17 +02:00
<!-- Generated by javadoc (version 1.7.0_07) on Fri Oct 05 04:44:05 CEST 2012 -->
2012-09-18 17:27:59 +02:00
<title>ProtocolManager</title>
2012-10-05 04:45:17 +02:00
<meta name="date" content="2012-10-05">
2012-09-18 17:27:59 +02:00
<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="ProtocolManager";
}
//-->
</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/ProtocolManager.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/ProtocolLibrary.html" title="class in com.comphenix.protocol"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/comphenix/protocol/ProtocolManager.html" target="_top">Frames</a></li>
<li><a href="ProtocolManager.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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</div>
<h2 title="Interface ProtocolManager" class="title">Interface ProtocolManager</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
2012-10-01 05:01:08 +02:00
<dt>All Superinterfaces:</dt>
<dd><a href="../../../com/comphenix/protocol/PacketStream.html" title="interface in com.comphenix.protocol">PacketStream</a></dd>
</dl>
<dl>
2012-09-18 17:27:59 +02:00
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../com/comphenix/protocol/injector/PacketFilterManager.html" title="class in com.comphenix.protocol.injector">PacketFilterManager</a></dd>
</dl>
<hr>
<br>
2012-10-01 05:01:08 +02:00
<pre>public interface <span class="strong">ProtocolManager</span>
extends <a href="../../../com/comphenix/protocol/PacketStream.html" title="interface in com.comphenix.protocol">PacketStream</a></pre>
2012-09-18 17:27:59 +02:00
<div class="block">Represents an API for accessing the Minecraft protocol.</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">
<!-- ========== 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>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#addPacketListener(com.comphenix.protocol.events.PacketListener)">addPacketListener</a></strong>(<a href="../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&nbsp;listener)</code>
<div class="block">Adds a packet listener.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#createPacket(int)">createPacket</a></strong>(int&nbsp;id)</code>
<div class="block">Constructs a new encapsulated Minecraft packet with the given ID.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#createPacket(int, boolean)">createPacket</a></strong>(int&nbsp;id,
boolean&nbsp;forceDefaults)</code>
<div class="block">Constructs a new encapsulated Minecraft packet with the given ID.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/comphenix/protocol/injector/PacketConstructor.html" title="class in com.comphenix.protocol.injector">PacketConstructor</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#createPacketConstructor(int, java.lang.Object...)">createPacketConstructor</a></strong>(int&nbsp;id,
java.lang.Object...&nbsp;arguments)</code>
<div class="block">Construct a packet using the special builtin Minecraft constructors.</div>
</td>
</tr>
<tr class="altColor">
2012-10-01 05:01:08 +02:00
<td class="colFirst"><code><a href="../../../com/comphenix/protocol/AsynchronousManager.html" title="interface in com.comphenix.protocol">AsynchronousManager</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#getAsynchronousManager()">getAsynchronousManager</a></strong>()</code>
<div class="block">Retrieve the current asyncronous packet manager.</div>
</td>
</tr>
<tr class="rowColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>com.google.common.collect.ImmutableSet&lt;<a href="../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#getPacketListeners()">getPacketListeners</a></strong>()</code>
<div class="block">Retrieves a list of every registered packet listener.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="altColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>java.util.Set&lt;java.lang.Integer&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#getReceivingFilters()">getReceivingFilters</a></strong>()</code>
<div class="block">Retrieves a immutable set containing the ID of the recieved client packets that will be observed by listeners.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="rowColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>java.util.Set&lt;java.lang.Integer&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#getSendingFilters()">getSendingFilters</a></strong>()</code>
<div class="block">Retrieves a immutable set containing the ID of the sent server packets that will be observed by listeners.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="altColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#isClosed()">isClosed</a></strong>()</code>
<div class="block">Determines whether or not this protocol mananger has been disabled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#removePacketListener(com.comphenix.protocol.events.PacketListener)">removePacketListener</a></strong>(<a href="../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&nbsp;listener)</code>
<div class="block">Removes a given packet listener.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="altColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#removePacketListeners(org.bukkit.plugin.Plugin)">removePacketListeners</a></strong>(org.bukkit.plugin.Plugin&nbsp;plugin)</code>
<div class="block">Removes every listener associated with the given plugin.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/comphenix/protocol/ProtocolManager.html#updateEntity(org.bukkit.entity.Entity, java.util.List)">updateEntity</a></strong>(org.bukkit.entity.Entity&nbsp;entity,
java.util.List&lt;org.bukkit.entity.Player&gt;&nbsp;observers)</code>
<div class="block">Completely refresh all clients about an entity.</div>
</td>
</tr>
</table>
2012-10-01 05:01:08 +02:00
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_com.comphenix.protocol.PacketStream">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;com.comphenix.protocol.<a href="../../../com/comphenix/protocol/PacketStream.html" title="interface in com.comphenix.protocol">PacketStream</a></h3>
<code><a href="../../../com/comphenix/protocol/PacketStream.html#recieveClientPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer)">recieveClientPacket</a>, <a href="../../../com/comphenix/protocol/PacketStream.html#recieveClientPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer, boolean)">recieveClientPacket</a>, <a href="../../../com/comphenix/protocol/PacketStream.html#sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer)">sendServerPacket</a>, <a href="../../../com/comphenix/protocol/PacketStream.html#sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer, boolean)">sendServerPacket</a></code></li>
</ul>
2012-09-18 17:27:59 +02:00
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getPacketListeners()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPacketListeners</h4>
<pre>com.google.common.collect.ImmutableSet&lt;<a href="../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&gt;&nbsp;getPacketListeners()</pre>
<div class="block">Retrieves a list of every registered packet listener.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Every registered packet listener.</dd></dl>
</li>
</ul>
<a name="addPacketListener(com.comphenix.protocol.events.PacketListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addPacketListener</h4>
<pre>void&nbsp;addPacketListener(<a href="../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&nbsp;listener)</pre>
<div class="block">Adds a packet listener.
<p>
Adding an already registered listener has no effect. If you need to change the packets
the current listener is observing, you must first remove the packet listener before you
can register it again.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - - new packet listener.</dd></dl>
</li>
</ul>
<a name="removePacketListener(com.comphenix.protocol.events.PacketListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePacketListener</h4>
<pre>void&nbsp;removePacketListener(<a href="../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&nbsp;listener)</pre>
<div class="block">Removes a given packet listener.
<p>
Attempting to remove a listener that doesn't exist has no effect.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - - the packet listener to remove.</dd></dl>
</li>
</ul>
<a name="removePacketListeners(org.bukkit.plugin.Plugin)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePacketListeners</h4>
<pre>void&nbsp;removePacketListeners(org.bukkit.plugin.Plugin&nbsp;plugin)</pre>
<div class="block">Removes every listener associated with the given plugin.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>plugin</code> - - the plugin to unload.</dd></dl>
</li>
</ul>
<a name="createPacket(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPacket</h4>
<pre><a href="../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a>&nbsp;createPacket(int&nbsp;id)</pre>
<div class="block">Constructs a new encapsulated Minecraft packet with the given ID.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - - packet ID.</dd>
<dt><span class="strong">Returns:</span></dt><dd>New encapsulated Minecraft packet.</dd></dl>
</li>
</ul>
<a name="createPacket(int, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPacket</h4>
<pre><a href="../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a>&nbsp;createPacket(int&nbsp;id,
boolean&nbsp;forceDefaults)</pre>
<div class="block">Constructs a new encapsulated Minecraft packet with the given ID.
<p>
If set to true, the <i>forceDefaults</i> option will force the system to automatically
give non-primitive fields in the packet sensible default values. For instance, certain
packets - like Packet60Explosion - require a List or Set to be non-null. If the
forceDefaults option is true, the List or Set will be automatically created.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - - packet ID.</dd><dd><code>forceDefaults</code> - - TRUE to use sensible defaults in most fields, FALSE otherwise.</dd>
<dt><span class="strong">Returns:</span></dt><dd>New encapsulated Minecraft packet.</dd></dl>
</li>
</ul>
<a name="createPacketConstructor(int, java.lang.Object...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPacketConstructor</h4>
<pre><a href="../../../com/comphenix/protocol/injector/PacketConstructor.html" title="class in com.comphenix.protocol.injector">PacketConstructor</a>&nbsp;createPacketConstructor(int&nbsp;id,
java.lang.Object...&nbsp;arguments)</pre>
<div class="block">Construct a packet using the special builtin Minecraft constructors.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - - the packet ID.</dd><dd><code>arguments</code> - - arguments that will be passed to the constructor.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The packet constructor.</dd></dl>
</li>
</ul>
<a name="updateEntity(org.bukkit.entity.Entity, java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateEntity</h4>
<pre>void&nbsp;updateEntity(org.bukkit.entity.Entity&nbsp;entity,
java.util.List&lt;org.bukkit.entity.Player&gt;&nbsp;observers)
throws <a href="../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Completely refresh all clients about an entity.
<p>
Note that this method is NOT thread safe. If you call this method from anything
but the main thread, it will throw an exception.</div>
2012-09-18 17:27:59 +02:00
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entity</code> - - entity to refresh.</dd><dd><code>observers</code> - - the clients to update.</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></dd></dl>
</li>
</ul>
<a name="getSendingFilters()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSendingFilters</h4>
<pre>java.util.Set&lt;java.lang.Integer&gt;&nbsp;getSendingFilters()</pre>
<div class="block">Retrieves a immutable set containing the ID of the sent server packets that will be observed by listeners.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Every filtered server packet.</dd></dl>
</li>
</ul>
<a name="getReceivingFilters()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReceivingFilters</h4>
<pre>java.util.Set&lt;java.lang.Integer&gt;&nbsp;getReceivingFilters()</pre>
<div class="block">Retrieves a immutable set containing the ID of the recieved client packets that will be observed by listeners.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Every filtered client packet.</dd></dl>
</li>
</ul>
<a name="isClosed()">
<!-- -->
</a>
2012-10-01 05:01:08 +02:00
<ul class="blockList">
2012-09-18 17:27:59 +02:00
<li class="blockList">
<h4>isClosed</h4>
<pre>boolean&nbsp;isClosed()</pre>
<div class="block">Determines whether or not this protocol mananger has been disabled.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE if it has, FALSE otherwise.</dd></dl>
</li>
</ul>
2012-10-01 05:01:08 +02:00
<a name="getAsynchronousManager()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAsynchronousManager</h4>
<pre><a href="../../../com/comphenix/protocol/AsynchronousManager.html" title="interface in com.comphenix.protocol">AsynchronousManager</a>&nbsp;getAsynchronousManager()</pre>
<div class="block">Retrieve the current asyncronous packet manager.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Asyncronous packet manager.</dd></dl>
</li>
</ul>
2012-09-18 17:27:59 +02:00
</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/ProtocolManager.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/ProtocolLibrary.html" title="class in com.comphenix.protocol"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/comphenix/protocol/ProtocolManager.html" target="_top">Frames</a></li>
<li><a href="ProtocolManager.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>