If any artificer has gone beyond the seas, and is exercising or teaching his trade in any foreign country, upon warning being given to him by any of his majesty's ministers or consuls abroad, or by one of his majesty's secretaries of state, for the time being, if he does not, within six months after such warning, return into this realm, and from henceforth abide and inhabit continually within the same, he is from thenceforth declared incapable of taking any legacy devised to him within this kingdom, or of being executor or administrator to any person, or of taking any lands within this kingdom, by descent, devise, or purchase.