Set the queued index before enqueuing, not after.

This commit is contained in:
Kristian S. Stangeland 2012-10-10 06:00:42 +02:00
parent cf68d229b0
commit 17b7526fe9
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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 {
/**