mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-30 22:53:26 +01:00
Notify users of PacketListener about async server events.
This commit is contained in:
parent
84ce20f202
commit
8eeb8645e7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user