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