If you are using PreferenceLoader for your preferences panel, you can save the value in a global variable and use darwin notifications to monitor the changes of preferences. You can find a lot examples in open source tweaks, such as one of mine:
https://github.com/Qusic/MailtoOpener/blob/master/Tweak.mm#L192