本文整理汇总了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);
}