mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
PluginsCommand: remove useless private function
This commit is contained in:
parent
7dd53f2397
commit
22fcfffa53
@ -44,15 +44,12 @@ class PluginsCommand extends VanillaCommand{
|
|||||||
if(!$this->testPermission($sender)){
|
if(!$this->testPermission($sender)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$this->sendPluginList($sender);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function sendPluginList(CommandSender $sender){
|
|
||||||
$list = array_map(function(Plugin $plugin) : string{
|
$list = array_map(function(Plugin $plugin) : string{
|
||||||
return ($plugin->isEnabled() ? TextFormat::GREEN : TextFormat::RED) . $plugin->getDescription()->getFullName();
|
return ($plugin->isEnabled() ? TextFormat::GREEN : TextFormat::RED) . $plugin->getDescription()->getFullName();
|
||||||
}, $sender->getServer()->getPluginManager()->getPlugins());
|
}, $sender->getServer()->getPluginManager()->getPlugins());
|
||||||
|
|
||||||
$sender->sendMessage(new TranslationContainer("pocketmine.command.plugins.success", [count($list), implode(TextFormat::WHITE . ", ", $list)]));
|
$sender->sendMessage(new TranslationContainer("pocketmine.command.plugins.success", [count($list), implode(TextFormat::WHITE . ", ", $list)]));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user