private static void register(Class<? extends Packet> packet) {
	try {
	    short id = packet.getField("ID").getShort(null);
	    if(id < 0)
		System.err.println("Packet ID undefined: " + packet.getSimpleName());
	    else if(packetTypes.containsKey(id)) 
		System.err.println("Duplicate Packet ID: " + packet.getSimpleName() + " (0x" + Integer.toHexString(id) + " = " + packetTypes.get(id).getSimpleName() + ")");
	    else
		packetTypes.put(id, packet);
	} catch (Exception e) {
	    e.printStackTrace();
	}
    }