mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
PluginManager: simplify isPluginEnabled()
This commit is contained in:
parent
23829952c3
commit
066c9d4fd4
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user