54 if(count($args) === 0){
55 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_serverSoftwareName(
56 TextFormat::GREEN . VersionInfo::NAME . TextFormat::RESET
58 $versionColor = VersionInfo::IS_DEVELOPMENT_BUILD ? TextFormat::YELLOW : TextFormat::GREEN;
59 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_serverSoftwareVersion(
60 $versionColor . VersionInfo::VERSION()->getFullVersion() . TextFormat::RESET,
61 TextFormat::GREEN . VersionInfo::GIT_HASH() . TextFormat::RESET
63 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_minecraftVersion(
67 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_phpVersion(TextFormat::GREEN . PHP_VERSION . TextFormat::RESET));
69 $jitMode = Utils::getOpcacheJitMode();
70 if($jitMode !==
null){
72 $jitStatus = KnownTranslationFactory::pocketmine_command_version_phpJitEnabled(sprintf(
"CRTO: %d", $jitMode));
74 $jitStatus = KnownTranslationFactory::pocketmine_command_version_phpJitDisabled();
77 $jitStatus = KnownTranslationFactory::pocketmine_command_version_phpJitNotSupported();
79 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_phpJitStatus($jitStatus->format(TextFormat::GREEN, TextFormat::RESET)));
80 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_operatingSystem(TextFormat::GREEN . Utils::getOS() . TextFormat::RESET));
82 $pluginName = implode(
" ", $args);
83 $exactPlugin = $sender->getServer()->getPluginManager()->getPlugin($pluginName);
85 if($exactPlugin instanceof
Plugin){
86 $this->describeToSender($exactPlugin, $sender);
92 $pluginName = strtolower($pluginName);
93 foreach($sender->getServer()->getPluginManager()->getPlugins() as $plugin){
94 if(stripos($plugin->getName(), $pluginName) !==
false){
95 $this->describeToSender($plugin, $sender);
101 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_version_noSuchPlugin());
110 $sender->sendMessage(TextFormat::DARK_GREEN . $desc->getName() . TextFormat::RESET .
" version " . TextFormat::DARK_GREEN . $desc->getVersion());