mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-12-02 15:44:05 +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())
|
if (asyncMarker.isQueued() || asyncMarker.isTransmitted())
|
||||||
throw new IllegalArgumentException("Cannot queue a packet that has already been queued.");
|
throw new IllegalArgumentException("Cannot queue a packet that has already been queued.");
|
||||||
|
|
||||||
|
asyncMarker.setQueuedSendingIndex(asyncMarker.getNewSendingIndex());
|
||||||
|
|
||||||
// Start the process
|
// Start the process
|
||||||
getSendingQueue(syncPacket).enqueue(newEvent);
|
getSendingQueue(syncPacket).enqueue(newEvent);
|
||||||
|
|
||||||
// We know this is occuring on the main thread, so pass TRUE
|
// We know this is occuring on the main thread, so pass TRUE
|
||||||
getProcessingQueue(syncPacket).enqueue(newEvent, true);
|
getProcessingQueue(syncPacket).enqueue(newEvent, true);
|
||||||
asyncMarker.setQueuedSendingIndex(asyncMarker.getNewSendingIndex());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -4,6 +4,11 @@ import net.minecraft.server.Packet;
|
|||||||
|
|
||||||
import com.comphenix.protocol.events.PacketEvent;
|
import com.comphenix.protocol.events.PacketEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an object that initiate the packet listeners.
|
||||||
|
*
|
||||||
|
* @author Kristian
|
||||||
|
*/
|
||||||
public interface ListenerInvoker {
|
public interface ListenerInvoker {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user