PluginManager: simplify isPluginEnabled()

This commit is contained in:
Dylan K. Taylor 2018-07-08 16:16:39 +01:00
parent 23829952c3
commit 066c9d4fd4

View File

@ -596,11 +596,7 @@ class PluginManager{
* @return bool
*/
public function isPluginEnabled(Plugin $plugin) : bool{
if($plugin instanceof Plugin and isset($this->plugins[$plugin->getDescription()->getName()])){
return $plugin->isEnabled();
}else{
return false;
}
return isset($this->plugins[$plugin->getDescription()->getName()]) and $plugin->isEnabled();
}
/**