getPluginLoader() public method

public getPluginLoader ( ) : pocketmine\plugin\PluginLoader
return pocketmine\plugin\PluginLoader
Ejemplo n.º 1
0
 private function cmdInfo(CommandSender $c, Plugin $p, $pageNumber)
 {
     $txt = [];
     $desc = $p->getDescription();
     $txt[] = TextFormat::AQUA . mc::_("Plugin: %1%", $desc->getFullName());
     if ($desc->getDescription()) {
         $txt[] = TextFormat::GREEN . mc::_("Description: ") . TextFormat::WHITE . $desc->getDescription();
     }
     if ($desc->getPrefix()) {
         $txt[] = TextFormat::GREEN . mc::_("Prefix: ") . ($txt[] = TextFormat::GREEN . mc::_("Main Class: ") . TextFormat::WHITE . $desc->getMain());
     }
     if ($desc->getWebsite()) {
         $txt[] = TextFormat::GREEN . mc::_("WebSite: ") . TextFormat::WHITE . $desc->getWebsite();
     }
     if (count($desc->getCompatibleApis())) {
         $txt[] = TextFormat::GREEN . mc::_("APIs: ") . TextFormat::WHITE . implode(TextFormat::BLUE . ", " . TextFormat::WHITE, $desc->getCompatibleApis());
     }
     if (count($desc->getAuthors())) {
         $txt[] = TextFormat::GREEN . mc::_("Authors: ") . TextFormat::WHITE . implode(TextFormat::BLUE . ", " . TextFormat::WHITE, $desc->getAuthors());
     }
     if (count($desc->getDepend())) {
         $txt[] = TextFormat::GREEN . mc::_("Dependancies: ") . TextFormat::WHITE . implode(TextFormat::BLUE . ", " . TextFormat::WHITE, $desc->getDepend());
     }
     if (count($desc->getSoftDepend())) {
         $txt[] = TextFormat::GREEN . mc::_("Soft-Dependancies: ") . TextFormat::WHITE . implode(TextFormat::BLUE . ", " . TextFormat::WHITE, $desc->getSoftDepend());
     }
     if (count($desc->getLoadBefore())) {
         $txt[] = TextFormat::GREEN . mc::_("Load Before: ") . TextFormat::WHITE . implode(TextFormat::BLUE . ", " . TextFormat::WHITE, $desc->getLoadBefore());
     }
     if (($cnt = count($desc->getCommands())) > 0) {
         $txt[] = TextFormat::GREEN . mc::_("Commands: ") . TextFormat::WHITE . $cnt;
     }
     if (($cnt = count($desc->getPermissions())) > 0) {
         $txt[] = TextFormat::GREEN . mc::_("Permissions: ") . TextFormat::WHITE . $cnt;
     }
     $loader = explode("\\", get_class($p->getPluginLoader()));
     $txt[] = TextFormat::GREEN . mc::_("PluginLoader: ") . TextFormat::WHITE . array_pop($loader);
     $file = $this->getPluginFilePath($p);
     $txt[] = TextFormat::GREEN . mc::_("FileName: ") . TextFormat::WHITE . $file;
     return $this->paginateText($c, $pageNumber, $txt);
 }