mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 23:15:29 +00:00
PluginManager: simplify isPluginEnabled()
This commit is contained in:
parent
23829952c3
commit
066c9d4fd4
@ -596,11 +596,7 @@ class PluginManager{
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isPluginEnabled(Plugin $plugin) : bool{
|
public function isPluginEnabled(Plugin $plugin) : bool{
|
||||||
if($plugin instanceof Plugin and isset($this->plugins[$plugin->getDescription()->getName()])){
|
return isset($this->plugins[$plugin->getDescription()->getName()]) and $plugin->isEnabled();
|
||||||
return $plugin->isEnabled();
|
|
||||||
}else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user