Disabling the plugin if there is no dependency plugin

Greetings all,

Please advise, I could not find a description or recommendations in the documentation. I am developing a plugin that depends on another plugin, and the problem occurs when the other plugin is either turned off or removed from the system, my plugin stops working and turns off.

Can you advise how to bypass this disabling, tried to add to pom.xml file Import-Package but it did not help