当前位置: 首页>>代码示例>>PHP>>正文


PHP Plugin::getPluginLoader方法代码示例

本文整理汇总了PHP中pocketmine\plugin\Plugin::getPluginLoader方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::getPluginLoader方法的具体用法?PHP Plugin::getPluginLoader怎么用?PHP Plugin::getPluginLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pocketmine\plugin\Plugin的用法示例。


在下文中一共展示了Plugin::getPluginLoader方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cmdInfo

 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);
 }
开发者ID:DWWf,项目名称:pocketmine-plugins,代码行数:41,代码来源:CmdPluginMgr.php


注:本文中的pocketmine\plugin\Plugin::getPluginLoader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。