ko drugome jamu kopa, sam u nju upada

Etymology
With reference to the Old Testament, Ecclesias 10:8: "He who digs a pit will fall into it, and whoever breaks through a wall will be bitten by a serpent." (MEV).

Proverb

 * 1) he who digs a pit for others, falls in himself