Archiviert
13
0

Set the queued index before enqueuing, not after.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2012-10-10 06:00:42 +02:00
Ursprung cf68d229b0
Commit 17b7526fe9
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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