mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-09-01 18:39:38 +02:00
Add some debug info for issue #109
This commit is contained in:
parent
cd7894f9f1
commit
c40d9c1e6c
|
@ -269,18 +269,42 @@ public class NettyProtocolInjector implements ProtocolInjector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PacketEvent onPacketSending(Injector injector, Object packet, NetworkMarker marker) {
|
public PacketEvent onPacketSending(Injector injector, Object packet, NetworkMarker marker) {
|
||||||
Class<?> clazz = packet.getClass();
|
Class<?> clazz = packet.getClass();
|
||||||
|
|
||||||
if (sendingFilters.contains(clazz) || marker != null) {
|
if (sendingFilters.contains(clazz) || marker != null) {
|
||||||
PacketContainer container = new PacketContainer(PacketRegistry.getPacketType(clazz), packet);
|
try {
|
||||||
return packetQueued(container, injector.getPlayer(), marker);
|
PacketContainer container = new PacketContainer(PacketRegistry.getPacketType(clazz), packet);
|
||||||
|
return packetQueued(container, injector.getPlayer(), marker);
|
||||||
|
} catch (LinkageError er) {
|
||||||
|
// Issue #109
|
||||||
|
if (isDebug()) {
|
||||||
|
try {
|
||||||
|
System.out.println("Encountered a LinkageError in onPacketSending");
|
||||||
|
System.out.println("injector=" + injector);
|
||||||
|
System.out.println("packet=" + packet);
|
||||||
|
System.out.println("marker=" + marker);
|
||||||
|
|
||||||
|
Thread curr = Thread.currentThread();
|
||||||
|
System.out.println("current thread=" + curr.getName());
|
||||||
|
System.out.println("class loader=" + curr.getContextClassLoader());
|
||||||
|
|
||||||
|
Class<PacketContainer> container = PacketContainer.class;
|
||||||
|
System.out.println("packet container=" + container);
|
||||||
|
System.out.println("class loader=" + container.getClassLoader());
|
||||||
|
} catch (LinkageError e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
er.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't change anything
|
// Don't change anything
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PacketEvent onPacketReceiving(Injector injector, Object packet, NetworkMarker marker) {
|
public PacketEvent onPacketReceiving(Injector injector, Object packet, NetworkMarker marker) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user