mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Added base translation system
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user