Sublime Forum

Unloading plugin

#1

Hi,

I’m developing a plugin that relies on some piece of software to be installed. I check for availability during plugin_loaded() (ST3)… in case of failure is there a way to force an unload of the plugin or to disable it? The crappy version is to store a global bool letting me know if it’s available or not and in EVERY calls to commands / events check if the bool is set to true… I’d prefer a more elegant option :smile:

Thanks!

0 Likes

#2

use of is_enabled(), although that’s pretty much the same.

0 Likes

#3

Thanks, I didn’t realize there was such a thing in the API, I’ll simply create a base class that does the checks and inherit from it

Thanks! :smile:

0 Likes

#4

No problem. That’s why we’re here :wink:

0 Likes