mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-12-04 16:44:22 +01:00
624 lines
31 KiB
HTML
624 lines
31 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_07) on Sun Nov 04 03:47:22 CET 2012 -->
|
|
<title>PlayerInjectionHandler</title>
|
|
<meta name="date" content="2012-11-04">
|
|
<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: </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.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"> </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/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 classLoader,
|
|
<a href="../../../../../com/comphenix/protocol/error/ErrorReporter.html" title="interface in com.comphenix.protocol.error">ErrorReporter</a> reporter,
|
|
com.google.common.base.Predicate<<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>> injectionFilter,
|
|
<a href="../../../../../com/comphenix/protocol/injector/ListenerInvoker.html" title="interface in com.comphenix.protocol.injector">ListenerInvoker</a> invoker,
|
|
java.util.Set<<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>> packetListeners,
|
|
org.bukkit.Server server)</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>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#addPacketHandler(int)">addPacketHandler</a></strong>(int 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> 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<<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>> 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> </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 inputStream)</code>
|
|
<div class="block">Retrieve a player by its DataInput connection.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<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>
|
|
<tr class="altColor">
|
|
<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> phase)</code>
|
|
<div class="block">Retrieves how the server packets are read.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>java.util.Set<java.lang.Integer></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>
|
|
<tr class="altColor">
|
|
<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 player)</code>
|
|
<div class="block">Invoke special routines for handling disconnect before a player is uninjected.</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#injectPlayer(org.bukkit.entity.Player)">injectPlayer</a></strong>(org.bukkit.entity.Player player)</code>
|
|
<div class="block">Initialize a player hook, allowing us to read server packets.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<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> phase)</code>
|
|
<div class="block">Determine if it's truly necessary to perform the given player injection.</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#processPacket(org.bukkit.entity.Player, net.minecraft.server.Packet)">processPacket</a></strong>(org.bukkit.entity.Player player,
|
|
net.minecraft.server.Packet mcPacket)</code>
|
|
<div class="block">Process a packet as if it were sent by the given player.</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#removePacketHandler(int)">removePacketHandler</a></strong>(int packetID)</code>
|
|
<div class="block">Remove an underlying packet handler of ths 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#scheduleDataInputRefresh(org.bukkit.entity.Player)">scheduleDataInputRefresh</a></strong>(org.bukkit.entity.Player player)</code>
|
|
<div class="block">Inform the current PlayerInjector that it should update the DataInputStream next.</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#sendServerPacket(org.bukkit.entity.Player, com.comphenix.protocol.events.PacketContainer, boolean)">sendServerPacket</a></strong>(org.bukkit.entity.Player reciever,
|
|
<a href="../../../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a> packet,
|
|
boolean filters)</code>
|
|
<div class="block">Send the given packet to the given reciever.</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#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> phase,
|
|
<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a> playerHook)</code>
|
|
<div class="block">Sets how the server packets are read.</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#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> playerHook)</code>
|
|
<div class="block">Sets how the server packets are read.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../../com/comphenix/protocol/injector/player/PlayerInjectionHandler.html#uninjectPlayer(java.net.InetSocketAddress)">uninjectPlayer</a></strong>(java.net.InetSocketAddress address)</code>
|
|
<div class="block">Unregisters a player by the given address.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<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)">uninjectPlayer</a></strong>(org.bukkit.entity.Player player)</code>
|
|
<div class="block">Unregisters the given player.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<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 player,
|
|
boolean removeAuxiliary)</code>
|
|
<div class="block">Unregisters the given player.</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="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)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>PlayerInjectionHandler</h4>
|
|
<pre>public PlayerInjectionHandler(java.lang.ClassLoader classLoader,
|
|
<a href="../../../../../com/comphenix/protocol/error/ErrorReporter.html" title="interface in com.comphenix.protocol.error">ErrorReporter</a> reporter,
|
|
com.google.common.base.Predicate<<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a>> injectionFilter,
|
|
<a href="../../../../../com/comphenix/protocol/injector/ListenerInvoker.html" title="interface in com.comphenix.protocol.injector">ListenerInvoker</a> invoker,
|
|
java.util.Set<<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>> packetListeners,
|
|
org.bukkit.Server 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 <a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a> 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 <a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a> getPlayerHook(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a> 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 void setPlayerHook(<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a> 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 void setPlayerHook(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a> phase,
|
|
<a href="../../../../../com/comphenix/protocol/injector/PacketFilterManager.PlayerInjectHooks.html" title="enum in com.comphenix.protocol.injector">PacketFilterManager.PlayerInjectHooks</a> 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 void addPacketHandler(int 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 void removePacketHandler(int 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>
|
|
<pre>public org.bukkit.entity.Player getPlayerByConnection(java.io.DataInputStream inputStream)</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>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The player.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="injectPlayer(org.bukkit.entity.Player)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>injectPlayer</h4>
|
|
<pre>public void injectPlayer(org.bukkit.entity.Player 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 boolean isInjectionNecessary(<a href="../../../../../com/comphenix/protocol/injector/GamePhase.html" title="enum in com.comphenix.protocol.injector">GamePhase</a> 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>
|
|
<a name="handleDisconnect(org.bukkit.entity.Player)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>handleDisconnect</h4>
|
|
<pre>public void handleDisconnect(org.bukkit.entity.Player 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>
|
|
<a name="uninjectPlayer(org.bukkit.entity.Player)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>uninjectPlayer</h4>
|
|
<pre>public boolean uninjectPlayer(org.bukkit.entity.Player 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 boolean uninjectPlayer(org.bukkit.entity.Player player,
|
|
boolean removeAuxiliary)</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><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>
|
|
</li>
|
|
</ul>
|
|
<a name="uninjectPlayer(java.net.InetSocketAddress)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>uninjectPlayer</h4>
|
|
<pre>public boolean uninjectPlayer(java.net.InetSocketAddress 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>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>address</code> - - address of the player to unregister.</dd><dd><code>serverHandler</code> - - whether or not the net server handler has already been created.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>TRUE if a player has been uninjected, FALSE otherwise.</dd></dl>
|
|
</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 void sendServerPacket(org.bukkit.entity.Player reciever,
|
|
<a href="../../../../../com/comphenix/protocol/events/PacketContainer.html" title="class in com.comphenix.protocol.events">PacketContainer</a> packet,
|
|
boolean 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>
|
|
<a name="processPacket(org.bukkit.entity.Player, net.minecraft.server.Packet)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>processPacket</h4>
|
|
<pre>public void processPacket(org.bukkit.entity.Player player,
|
|
net.minecraft.server.Packet mcPacket)
|
|
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 void checkListener(java.util.Set<<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a>> 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 void checkListener(<a href="../../../../../com/comphenix/protocol/events/PacketListener.html" title="interface in com.comphenix.protocol.events">PacketListener</a> listener)</pre>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
<a name="getSendingFilters()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSendingFilters</h4>
|
|
<pre>public java.util.Set<java.lang.Integer> 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 void close()</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="scheduleDataInputRefresh(org.bukkit.entity.Player)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>scheduleDataInputRefresh</h4>
|
|
<pre>public void scheduleDataInputRefresh(org.bukkit.entity.Player 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: </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>
|