For now here is my current workaround, I am just using the isActive function for now which I know is not the best solution because when the plugin is uninstalled it would not run my method that I have in isActive but when the plugin is installed again it would be in it disabled state by default so I should be able to just run my methods then giving the new install a clean and fresh slate to work with. So this is how I call it in my plugin's class:
function isActive() {
if (!parent::isActive()) {
\\ Run a method or function when the plugin is not active.
} else {
\\ Run a method or function when the plugin is active.
}
return parent::isActive();
}
This is also better than running a method or function when a plugin is enabled as that only happens when a plugin is installed not when a plugin is enabled or disabled as the name would indicate. But here is that function for anyone referring this in the future:
function enable() {
\\ Run a method or function when plugin is installed.
return parent::enable();
}
I hope whenever the team has time in the future to fix this issue they do so as it would help in the future. Also please remove the mention of uninstall from your own auth-2fa core plugin as it is very confusing for someone referring to it when developing a plugin for 1.17.x+ as disable was only a function of osTicket in 1.16.x and before.