mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Updated language files and command descriptions
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
namespace pocketmine\command\defaults;
|
||||
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\event\TranslationContainer;
|
||||
use pocketmine\utils\TextFormat;
|
||||
|
||||
class PluginsCommand extends VanillaCommand{
|
||||
@@ -29,8 +30,8 @@ class PluginsCommand extends VanillaCommand{
|
||||
public function __construct($name){
|
||||
parent::__construct(
|
||||
$name,
|
||||
"Gets a list of plugins running on the server",
|
||||
"/plugins",
|
||||
"%pocketmine.command.plugins.description",
|
||||
"%pocketmine.command.plugins.usage",
|
||||
["pl"]
|
||||
);
|
||||
$this->setPermission("pocketmine.command.plugins");
|
||||
@@ -40,13 +41,11 @@ class PluginsCommand extends VanillaCommand{
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
||||
$sender->sendMessage("Plugins " . $this->getPluginList($sender));
|
||||
|
||||
$this->sendPluginList($sender);
|
||||
return true;
|
||||
}
|
||||
|
||||
private function getPluginList(CommandSender $sender){
|
||||
private function sendPluginList(CommandSender $sender){
|
||||
$list = "";
|
||||
foreach(($plugins = $sender->getServer()->getPluginManager()->getPlugins()) as $plugin){
|
||||
if(strlen($list) > 0){
|
||||
@@ -56,6 +55,6 @@ class PluginsCommand extends VanillaCommand{
|
||||
$list .= $plugin->getDescription()->getFullName();
|
||||
}
|
||||
|
||||
return "(" . count($plugins) . "): $list";
|
||||
$sender->sendMessage(new TranslationContainer("pocketmine.command.plugins.success", [count($plugins), $list]));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user