From 8eeb8645e7f097c2ae5d48803151036410e2d048 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Fri, 6 Dec 2013 05:56:02 +0100 Subject: [PATCH] Notify users of PacketListener about async server events. --- .../java/com/comphenix/protocol/events/PacketListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketListener.java b/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketListener.java index c888d8fc..18b8f096 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketListener.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/events/PacketListener.java @@ -32,8 +32,10 @@ public interface PacketListener { *

* Note that the packet may be replaced, if needed. *

- * 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. + *

+ * Warning: 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);