Suppose that a European country X (e.g. Germany) has a law against adults sleeping with people under the age of 16. Such a law, in this instance, would apply to anyone in German territory.
But suppose the law was that a German citizen isn't allowed to go to Asian country Y, where sleeping with 15 year olds is legal, and do in that country what is illegal under German law in Germany.
What is that called? The term I was thinking of was "extraterritoriality," but I was told that was a situation where the German was exempt from the law of the Asian country, e.g. China in the early 20th century.