Added base translation system

This commit is contained in:
Shoghi Cervantes
2015-04-11 01:32:08 +02:00
parent 3224cd7dc5
commit 0c041ebca3
38 changed files with 646 additions and 132 deletions

View File

@@ -22,6 +22,7 @@
namespace pocketmine\command\defaults;
use pocketmine\command\CommandSender;
use pocketmine\event\TranslationContainer;
use pocketmine\Player;
@@ -31,7 +32,7 @@ class ListCommand extends VanillaCommand{
parent::__construct(
$name,
"Lists all online players",
"/list"
"%command.players.usage"
);
$this->setPermission("pocketmine.command.list");
}
@@ -51,7 +52,7 @@ class ListCommand extends VanillaCommand{
}
}
$sender->sendMessage("There are " . $onlineCount . "/" . $sender->getServer()->getMaxPlayers() . " players online:\n" . substr($online, 0, -2));
$sender->sendMessage(new TranslationContainer("%commands.players.list " . substr($online, 0, -2), [$onlineCount, $sender->getServer()->getMaxPlayers()]));
return true;
}