>>5920254German law fag here. We have do have Erpresserischer Menschenraub and Geiselnahme (kidnapping in different varieties) but this wouldn't apply here because it necessitates more than "just" any restriction of freedom, the perpetrator needs to seize control of a person and needs to commit the crime in order to force the victim or a third party to do something, ie pay ransom etc. (More nuances apply but I've autistic enough as it is.)
We also have Freiheitsberaubung (deprivation of liberty) which criminalizes unlawful imprisonment, meaning preventing another person from leaving a room via external devices or other measures, as well as the deprivation of freedom in any other way which includes any act or omission by which another person is prevented from leaving a place by completely taking away their freedom of movement.
As you can see, it's not about preventing a person from going to a certain place, it's about preventing a person from leaving.
Still, forcefully blocking the entry to a restaurant WOULD be illegal. It's Nรถtigung (coercion) to unlawfully force another person, through violence or the threat of serious harm, to perform an act, tolerate something, or refrain from doing something.