mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-12-17 22:57:51 +01:00
Add a warning message for lost packets.
This commit is contained in:
parent
5bda655f39
commit
dc75f34e11
@ -3,6 +3,6 @@
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="lib" path="D:/Games/Minecraft/Server Mods/API/bukkit-1.3.1-R2.0.jar"/>
|
||||
<classpathentry kind="lib" path="/ProtocolLib/bin/ProtocolLib.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/ProtocolLib"/>
|
||||
<classpathentry kind="output" path="class"/>
|
||||
</classpath>
|
||||
|
@ -9,6 +9,7 @@ import java.util.concurrent.PriorityBlockingQueue;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
import com.comphenix.protocol.injector.PlayerLoggedOutException;
|
||||
import com.comphenix.protocol.reflect.FieldAccessException;
|
||||
|
||||
/**
|
||||
@ -184,6 +185,12 @@ class PacketSendingQueue {
|
||||
if (marker != null && !marker.isTransmitted()) {
|
||||
marker.sendPacket(event);
|
||||
}
|
||||
|
||||
} catch (PlayerLoggedOutException e) {
|
||||
System.out.println(String.format(
|
||||
"Warning: Dropped packet index %s of ID %s",
|
||||
marker.getOriginalSendingIndex(), event.getPacketID()
|
||||
));
|
||||
|
||||
} catch (IOException e) {
|
||||
// Just print the error
|
||||
|
Loading…
Reference in New Issue
Block a user