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/injector/player/PlayerInjectionHandler.html

652 Zeilen
33 KiB
HTML

2012-10-17 08:07:20 +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-12-10 16:45:24 +01:00
<!-- Generated by javadoc (version 1.7.0_07) on Mon Dec 10 16:44:13 CET 2012 -->
2012-10-17 08:07:20 +02:00
<title>PlayerInjectionHandler</title>
2012-12-10 16:45:24 +01:00
<meta name="date" content="2012-12-10">
2012-10-17 08:07:20 +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="PlayerInjectionHandler";
}
//-->
</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/PlayerInjectionHandler.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/injector/player/NetworkServerInjector.html" title="class in com.comphenix.protocol.injector.player"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/comphenix/protocol/injector/player/PlayerInjectionHandler.html" target="_top">Frames</a></li>
<li><a href="PlayerInjectionHandler.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><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>Field&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.injector.player</div>
<h2 title="Class PlayerInjectionHandler" class="title">Class PlayerInjectionHandler</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.comphenix.protocol.injector.player.PlayerInjectionHandler</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">PlayerInjectionHandler</span>
extends java.lang.Object</pre>
<div class="block">Responsible for injecting into a player's sendPacket method.</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">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
2012-11-04 03:50:58 +01:00
<td class="colOne"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#PlayerInjectionHandler(java.lang.ClassLoader, com.comphenix.protocol.error.ErrorReporter, com.google.common.base.Predicate, com.comphenix.protocol.injector.ListenerInvoker, java.util.Set, org.bukkit.Server)">PlayerInjectionHandler</a></strong>(java.lang.ClassLoader&nbsp;classLoader,
<a href="../../../../../com/comphenix/protocol/error/ErrorReporter.html" title="interface in com.comphenix.protocol.error">ErrorReporter</a>&nbsp;reporter,
2012-10-17 08:07:20 +02:00
com.google.common.base.Predicate&lt;<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&gt;&nbsp;injectionFilter,
<a href="../../../../../com/comphenix/protocol/injector/ListenerInvoker.html" title="interface in com.comphenix.protocol.injector">ListenerInvoker</a>&nbsp;invoker,
2012-11-04 03:50:58 +01:00
java.util.Set&lt;<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&gt;&nbsp;packetListeners,
2012-10-17 08:07:20 +02:00
org.bukkit.Server&nbsp;server)</code>&nbsp;</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>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#addPacketHandler(int)">addPacketHandler</a></strong>(int&nbsp;packetID)</code>
<div class="block">Add an underlying packet handler of the given ID.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#checkListener(com.comphenix.protocol.events.PacketListener)">checkListener</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">Determine if a listener is valid or not.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#checkListener(java.util.Set)">checkListener</a></strong>(java.util.Set&lt;<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&gt;&nbsp;listeners)</code>
<div class="block">Determine if the given listeners are valid.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#close()">close</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.bukkit.entity.Player</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#getPlayerByConnection(java.io.DataInputStream)">getPlayerByConnection</a></strong>(java.io.DataInputStream&nbsp;inputStream)</code>
<div class="block">Retrieve a player by its DataInput connection.</div>
</td>
</tr>
2012-11-04 03:50:58 +01:00
<tr class="rowColor">
2012-12-04 00:58:16 +01:00
<td class="colFirst"><code>org.bukkit.entity.Player</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#getPlayerByConnection(java.io.DataInputStream, long, java.util.concurrent.TimeUnit)">getPlayerByConnection</a></strong>(java.io.DataInputStream&nbsp;inputStream,
long&nbsp;playerTimeout,
java.util.concurrent.TimeUnit&nbsp;unit)</code>
<div class="block">Retrieve a player by its DataInput connection.</div>
</td>
</tr>
<tr class="altColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code><a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#getPlayerHook()">getPlayerHook</a></strong>()</code>
<div class="block">Retrieves how the server packets are read.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code><a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#getPlayerHook(com.comphenix.protocol.injector.GamePhase)">getPlayerHook</a></strong>(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&nbsp;phase)</code>
<div class="block">Retrieves how the server packets are read.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-10-17 08:07:20 +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/injector/player/PlayerInjectionHandler.html#getSendingFilters()">getSendingFilters</a></strong>()</code>
<div class="block">Retrieve the current list of registered sending listeners.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-11-04 03:50:58 +01:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#handleDisconnect(org.bukkit.entity.Player)">handleDisconnect</a></strong>(org.bukkit.entity.Player&nbsp;player)</code>
<div class="block">Invoke special routines for handling disconnect before a player is uninjected.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#injectPlayer(org.bukkit.entity.Player)">injectPlayer</a></strong>(org.bukkit.entity.Player&nbsp;player)</code>
<div class="block">Initialize a player hook, allowing us to read server packets.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#isInjectionNecessary(com.comphenix.protocol.injector.GamePhase)">isInjectionNecessary</a></strong>(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&nbsp;phase)</code>
<div class="block">Determine if it's truly necessary to perform the given player injection.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
2012-12-10 16:45:24 +01:00
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#processPacket(org.bukkit.entity.Player, java.lang.Object)">processPacket</a></strong>(org.bukkit.entity.Player&nbsp;player,
java.lang.Object&nbsp;mcPacket)</code>
2012-10-17 08:07:20 +02:00
<div class="block">Process a packet as if it were sent by the given player.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#removePacketHandler(int)">removePacketHandler</a></strong>(int&nbsp;packetID)</code>
<div class="block">Remove an underlying packet handler of ths ID.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#scheduleDataInputRefresh(org.bukkit.entity.Player)">scheduleDataInputRefresh</a></strong>(org.bukkit.entity.Player&nbsp;player)</code>
<div class="block">Inform the current PlayerInjector that it should update the DataInputStream next.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer, boolean)">sendServerPacket</a></strong>(org.bukkit.entity.Player&nbsp;reciever,
<a href="../../../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a>&nbsp;packet,
boolean&nbsp;filters)</code>
<div class="block">Send the given packet to the given reciever.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#setPlayerHook(com.comphenix.protocol.injector.GamePhase, com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks)">setPlayerHook</a></strong>(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&nbsp;phase,
<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a>&nbsp;playerHook)</code>
<div class="block">Sets how the server packets are read.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-10-17 08:07:20 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#setPlayerHook(com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks)">setPlayerHook</a></strong>(<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a>&nbsp;playerHook)</code>
<div class="block">Sets how the server packets are read.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-11-04 03:50:58 +01:00
<td class="colFirst"><code>boolean</code></td>
2012-10-17 08:07:20 +02:00
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#uninjectPlayer(java.net.InetSocketAddress)">uninjectPlayer</a></strong>(java.net.InetSocketAddress&nbsp;address)</code>
<div class="block">Unregisters a player by the given address.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="rowColor">
2012-11-04 03:50:58 +01:00
<td class="colFirst"><code>boolean</code></td>
2012-10-17 08:07:20 +02:00
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#uninjectPlayer(org.bukkit.entity.Player)">uninjectPlayer</a></strong>(org.bukkit.entity.Player&nbsp;player)</code>
<div class="block">Unregisters the given player.</div>
</td>
</tr>
2012-12-04 00:58:16 +01:00
<tr class="altColor">
2012-11-04 03:50:58 +01:00
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#uninjectPlayer(org.bukkit.entity.Player, boolean)">uninjectPlayer</a></strong>(org.bukkit.entity.Player&nbsp;player,
boolean&nbsp;removeAuxiliary)</code>
<div class="block">Unregisters the given player.</div>
</td>
</tr>
2012-10-17 08:07:20 +02:00
</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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
2012-11-04 03:50:58 +01:00
<a name="PlayerInjectionHandler(java.lang.ClassLoader, com.comphenix.protocol.error.ErrorReporter, com.google.common.base.Predicate, com.comphenix.protocol.injector.ListenerInvoker, java.util.Set, org.bukkit.Server)">
2012-10-17 08:07:20 +02:00
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PlayerInjectionHandler</h4>
<pre>public&nbsp;PlayerInjectionHandler(java.lang.ClassLoader&nbsp;classLoader,
2012-11-04 03:50:58 +01:00
<a href="../../../../../com/comphenix/protocol/error/ErrorReporter.html" title="interface in com.comphenix.protocol.error">ErrorReporter</a>&nbsp;reporter,
2012-10-17 08:07:20 +02:00
com.google.common.base.Predicate&lt;<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&gt;&nbsp;injectionFilter,
<a href="../../../../../com/comphenix/protocol/injector/ListenerInvoker.html" title="interface in com.comphenix.protocol.injector">ListenerInvoker</a>&nbsp;invoker,
2012-11-04 03:50:58 +01:00
java.util.Set&lt;<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&gt;&nbsp;packetListeners,
2012-10-17 08:07:20 +02:00
org.bukkit.Server&nbsp;server)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getPlayerHook()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlayerHook</h4>
<pre>public&nbsp;<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a>&nbsp;getPlayerHook()</pre>
<div class="block">Retrieves how the server packets are read.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Injection method for reading server packets.</dd></dl>
</li>
</ul>
<a name="getPlayerHook(com.comphenix.protocol.injector.GamePhase)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlayerHook</h4>
<pre>public&nbsp;<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a>&nbsp;getPlayerHook(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&nbsp;phase)</pre>
<div class="block">Retrieves how the server packets are read.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>phase</code> - - the current game phase.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Injection method for reading server packets.</dd></dl>
</li>
</ul>
<a name="setPlayerHook(com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlayerHook</h4>
<pre>public&nbsp;void&nbsp;setPlayerHook(<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a>&nbsp;playerHook)</pre>
<div class="block">Sets how the server packets are read.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>playerHook</code> - - the new injection method for reading server packets.</dd></dl>
</li>
</ul>
<a name="setPlayerHook(com.comphenix.protocol.injector.GamePhase, com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlayerHook</h4>
<pre>public&nbsp;void&nbsp;setPlayerHook(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&nbsp;phase,
<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a>&nbsp;playerHook)</pre>
<div class="block">Sets how the server packets are read.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>phase</code> - - the current game phase.</dd><dd><code>playerHook</code> - - the new injection method for reading server packets.</dd></dl>
</li>
</ul>
<a name="addPacketHandler(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addPacketHandler</h4>
<pre>public&nbsp;void&nbsp;addPacketHandler(int&nbsp;packetID)</pre>
<div class="block">Add an underlying packet handler of the given ID.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>packetID</code> - - packet ID to register.</dd></dl>
</li>
</ul>
<a name="removePacketHandler(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePacketHandler</h4>
<pre>public&nbsp;void&nbsp;removePacketHandler(int&nbsp;packetID)</pre>
<div class="block">Remove an underlying packet handler of ths ID.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>packetID</code> - - packet ID to unregister.</dd></dl>
</li>
</ul>
<a name="getPlayerByConnection(java.io.DataInputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlayerByConnection</h4>
2012-12-04 00:58:16 +01:00
<pre>public&nbsp;org.bukkit.entity.Player&nbsp;getPlayerByConnection(java.io.DataInputStream&nbsp;inputStream)
throws java.lang.InterruptedException</pre>
2012-10-17 08:07:20 +02:00
<div class="block">Retrieve a player by its DataInput connection.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>inputStream</code> - - the associated DataInput connection.</dd>
2012-12-04 00:58:16 +01:00
<dt><span class="strong">Returns:</span></dt><dd>The player.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.InterruptedException</code> - If the thread was interrupted during the wait.</dd></dl>
</li>
</ul>
<a name="getPlayerByConnection(java.io.DataInputStream, long, java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlayerByConnection</h4>
<pre>public&nbsp;org.bukkit.entity.Player&nbsp;getPlayerByConnection(java.io.DataInputStream&nbsp;inputStream,
long&nbsp;playerTimeout,
java.util.concurrent.TimeUnit&nbsp;unit)
throws java.lang.InterruptedException</pre>
<div class="block">Retrieve a player by its DataInput connection.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>inputStream</code> - - the associated DataInput connection.</dd><dd><code>playerTimeout</code> - - the amount of time to wait for a result.</dd><dd><code>unit</code> - - unit of playerTimeout.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The player.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.InterruptedException</code> - If the thread was interrupted during the wait.</dd></dl>
2012-10-17 08:07:20 +02:00
</li>
</ul>
<a name="injectPlayer(org.bukkit.entity.Player)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>injectPlayer</h4>
<pre>public&nbsp;void&nbsp;injectPlayer(org.bukkit.entity.Player&nbsp;player)</pre>
<div class="block">Initialize a player hook, allowing us to read server packets.
<p>
This call will be ignored if there's no listener that can receive the given events.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>player</code> - - player to hook.</dd></dl>
</li>
</ul>
<a name="isInjectionNecessary(com.comphenix.protocol.injector.GamePhase)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInjectionNecessary</h4>
<pre>public&nbsp;boolean&nbsp;isInjectionNecessary(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>&nbsp;phase)</pre>
<div class="block">Determine if it's truly necessary to perform the given player injection.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>phase</code> - - current game phase.</dd>
<dt><span class="strong">Returns:</span></dt><dd>TRUE if we should perform the injection, FALSE otherwise.</dd></dl>
</li>
</ul>
2012-11-04 03:50:58 +01:00
<a name="handleDisconnect(org.bukkit.entity.Player)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleDisconnect</h4>
<pre>public&nbsp;void&nbsp;handleDisconnect(org.bukkit.entity.Player&nbsp;player)</pre>
<div class="block">Invoke special routines for handling disconnect before a player is uninjected.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>player</code> - - player to process.</dd></dl>
</li>
</ul>
2012-10-17 08:07:20 +02:00
<a name="uninjectPlayer(org.bukkit.entity.Player)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uninjectPlayer</h4>
2012-11-04 03:50:58 +01:00
<pre>public&nbsp;boolean&nbsp;uninjectPlayer(org.bukkit.entity.Player&nbsp;player)</pre>
<div class="block">Unregisters the given player.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>player</code> - - player to unregister.</dd>
<dt><span class="strong">Returns:</span></dt><dd>TRUE if a player has been uninjected, FALSE otherwise.</dd></dl>
</li>
</ul>
<a name="uninjectPlayer(org.bukkit.entity.Player, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uninjectPlayer</h4>
<pre>public&nbsp;boolean&nbsp;uninjectPlayer(org.bukkit.entity.Player&nbsp;player,
boolean&nbsp;removeAuxiliary)</pre>
2012-10-17 08:07:20 +02:00
<div class="block">Unregisters the given player.</div>
2012-11-04 03:50:58 +01:00
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>player</code> - - player to unregister.</dd><dd><code>removeAuxiliary</code> - - TRUE to remove auxiliary information, such as input stream and address.</dd>
<dt><span class="strong">Returns:</span></dt><dd>TRUE if a player has been uninjected, FALSE otherwise.</dd></dl>
2012-10-17 08:07:20 +02:00
</li>
</ul>
<a name="uninjectPlayer(java.net.InetSocketAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uninjectPlayer</h4>
2012-11-04 03:50:58 +01:00
<pre>public&nbsp;boolean&nbsp;uninjectPlayer(java.net.InetSocketAddress&nbsp;address)</pre>
<div class="block">Unregisters a player by the given address.
<p>
If the server handler has been created before we've gotten a chance to unject the player,
the method will try a workaround to remove the injected hook in the NetServerHandler.</div>
2012-11-13 17:54:42 +01:00
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>address</code> - - address of the player to unregister.</dd>
2012-11-04 03:50:58 +01:00
<dt><span class="strong">Returns:</span></dt><dd>TRUE if a player has been uninjected, FALSE otherwise.</dd></dl>
2012-10-17 08:07:20 +02:00
</li>
</ul>
<a name="sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendServerPacket</h4>
<pre>public&nbsp;void&nbsp;sendServerPacket(org.bukkit.entity.Player&nbsp;reciever,
<a href="../../../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a>&nbsp;packet,
boolean&nbsp;filters)
throws java.lang.reflect.InvocationTargetException</pre>
<div class="block">Send the given packet to the given reciever.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>reciever</code> - - the player receiver.</dd><dd><code>packet</code> - - the packet to send.</dd><dd><code>filters</code> - - whether or not to invoke the packet filters.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.reflect.InvocationTargetException</code> - If an error occured during sending.</dd></dl>
</li>
</ul>
2012-12-10 16:45:24 +01:00
<a name="processPacket(org.bukkit.entity.Player, java.lang.Object)">
2012-10-17 08:07:20 +02:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processPacket</h4>
<pre>public&nbsp;void&nbsp;processPacket(org.bukkit.entity.Player&nbsp;player,
2012-12-10 16:45:24 +01:00
java.lang.Object&nbsp;mcPacket)
2012-10-17 08:07:20 +02:00
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException</pre>
<div class="block">Process a packet as if it were sent by the given player.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>player</code> - - the sender.</dd><dd><code>mcPacket</code> - - the packet to process.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalAccessException</code> - If the reflection machinery failed.</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - If the underlying method caused an error.</dd></dl>
</li>
</ul>
<a name="checkListener(java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkListener</h4>
<pre>public&nbsp;void&nbsp;checkListener(java.util.Set&lt;<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&gt;&nbsp;listeners)</pre>
<div class="block">Determine if the given listeners are valid.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listeners</code> - - listeners to check.</dd></dl>
</li>
</ul>
<a name="checkListener(com.comphenix.protocol.events.PacketListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkListener</h4>
<pre>public&nbsp;void&nbsp;checkListener(<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>&nbsp;listener)</pre>
2012-11-04 03:50:58 +01:00
<div class="block">Determine if a listener is valid or not.
<p>
If not, a warning will be printed to the console.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - - listener to check.</dd></dl>
2012-10-17 08:07:20 +02:00
</li>
</ul>
<a name="getSendingFilters()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSendingFilters</h4>
<pre>public&nbsp;java.util.Set&lt;java.lang.Integer&gt;&nbsp;getSendingFilters()</pre>
<div class="block">Retrieve the current list of registered sending listeners.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>List of the sending listeners's packet IDs.</dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
</li>
</ul>
<a name="scheduleDataInputRefresh(org.bukkit.entity.Player)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>scheduleDataInputRefresh</h4>
<pre>public&nbsp;void&nbsp;scheduleDataInputRefresh(org.bukkit.entity.Player&nbsp;player)</pre>
<div class="block">Inform the current PlayerInjector that it should update the DataInputStream next.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>player</code> - - the player to update.</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/PlayerInjectionHandler.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/injector/player/NetworkServerInjector.html" title="class in com.comphenix.protocol.injector.player"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/comphenix/protocol/injector/player/PlayerInjectionHandler.html" target="_top">Frames</a></li>
<li><a href="PlayerInjectionHandler.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><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>Field&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>