Skip to content

Commit dc75f34

Browse files
committed
Add a warning message for lost packets.
1 parent 5bda655 commit dc75f34

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ItemDisguise/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
55
<classpathentry kind="lib" path="D:/Games/Minecraft/Server Mods/API/bukkit-1.3.1-R2.0.jar"/>
6-
<classpathentry kind="lib" path="/ProtocolLib/bin/ProtocolLib.jar"/>
6+
<classpathentry combineaccessrules="false" kind="src" path="/ProtocolLib"/>
77
<classpathentry kind="output" path="class"/>
88
</classpath>

ProtocolLib/src/main/java/com/comphenix/protocol/async/PacketSendingQueue.java

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.bukkit.entity.Player;
1010

1111
import com.comphenix.protocol.events.PacketEvent;
12+
import com.comphenix.protocol.injector.PlayerLoggedOutException;
1213
import com.comphenix.protocol.reflect.FieldAccessException;
1314

1415
/**
@@ -184,6 +185,12 @@ private void sendPacket(PacketEvent event) {
184185
if (marker != null && !marker.isTransmitted()) {
185186
marker.sendPacket(event);
186187
}
188+
189+
} catch (PlayerLoggedOutException e) {
190+
System.out.println(String.format(
191+
"Warning: Dropped packet index %s of ID %s",
192+
marker.getOriginalSendingIndex(), event.getPacketID()
193+
));
187194

188195
} catch (IOException e) {
189196
// Just print the error

0 commit comments

Comments
 (0)