mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-30 14:43:27 +01:00
Set the queued index before enqueuing, not after.
This commit is contained in:
parent
cf68d229b0
commit
17b7526fe9
@ -186,12 +186,13 @@ public class AsyncFilterManager implements AsynchronousManager {
|
||||
if (asyncMarker.isQueued() || asyncMarker.isTransmitted())
|
||||
throw new IllegalArgumentException("Cannot queue a packet that has already been queued.");
|
||||
|
||||
asyncMarker.setQueuedSendingIndex(asyncMarker.getNewSendingIndex());
|
||||
|
||||
// Start the process
|
||||
getSendingQueue(syncPacket).enqueue(newEvent);
|
||||
|
||||
// We know this is occuring on the main thread, so pass TRUE
|
||||
getProcessingQueue(syncPacket).enqueue(newEvent, true);
|
||||
asyncMarker.setQueuedSendingIndex(asyncMarker.getNewSendingIndex());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,11 @@ import net.minecraft.server.Packet;
|
||||
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
|
||||
/**
|
||||
* Represents an object that initiate the packet listeners.
|
||||
*
|
||||
* @author Kristian
|
||||
*/
|
||||
public interface ListenerInvoker {
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user