PojoClass apiPacket = PojoClassFactory.getPojoClass(Class.forName("com.bergerkiller.bukkit.common.protocol.PacketTypeClasses$" + apiPacketName));
List<PojoField> expectedFields = nmsPacket.getPojoFields();
List<PojoField> actualFields = apiPacket.getPojoFields();
for(PojoField pojoField : expectedFields) {
if(!pojoField.getName().equals("timestamp") && !pojoField.isStatic()) {
PojoField actual = getFromList(actualFields, pojoField.getName(), apiPacket);
Assert.assertNotNull("Method missing, could not find method named " + pojoField.getName() + " for " + nmsPacket.getClazz().getSimpleName(), actual);
if(actual != null)
Assert.assertEquals("Method types dont match, method " + pojoField.getName() + " from " + nmsPacket.getClazz().getSimpleName() + " doesn't match API type.", pojoField.getType(), actual.getType());
}
}
} catch(Exception e) {
;
}