mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 21:26:17 +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="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="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="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"/>
|
<classpathentry kind="output" path="class"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -9,6 +9,7 @@ import java.util.concurrent.PriorityBlockingQueue;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.comphenix.protocol.events.PacketEvent;
|
import com.comphenix.protocol.events.PacketEvent;
|
||||||
|
import com.comphenix.protocol.injector.PlayerLoggedOutException;
|
||||||
import com.comphenix.protocol.reflect.FieldAccessException;
|
import com.comphenix.protocol.reflect.FieldAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,6 +186,12 @@ class PacketSendingQueue {
|
|||||||
marker.sendPacket(event);
|
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) {
|
} catch (IOException e) {
|
||||||
// Just print the error
|
// Just print the error
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user