Notify users of PacketListener about async server events.

This commit is contained in:
Kristian S. Stangeland 2013-12-06 05:56:02 +01:00
parent 84ce20f202
commit 8eeb8645e7

View File

@ -32,8 +32,10 @@ public interface PacketListener {
* <p>
* Note that the packet may be replaced, if needed.
* <p>
* This method is executed on the main thread, and thus the Bukkit API is safe to use.
*
* This method is executed on the main thread in 1.6.4 and earlier, and thus the Bukkit API is safe to use.
* <p>
* <b>Warning:</b> In 1.7.2 and later, login and status packets are executed on a worker thread.
* Call {@link PacketEvent#isAsync()} to detect this in your listener.
* @param event - the packet that should be sent.
*/
public void onPacketSending(PacketEvent event);