Not quite. Weapon use would be possible as "Rechtfertigender Notstand", https://dejure.org/gesetze/StGB/34.html . This doesn't just include protection of ones own life, but also of property. However, the force used has to be suitable and proportionate, so shooting someone dead would not be justified. Injuring someone would usually be justified, but will always land in front of a judge to apply 20/20 hindsight. And no one wants to accept that risk.