mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 06:25:32 +00:00
Translate command usage messages server-side, close #236
This commit is contained in:
parent
ffefcd4473
commit
acaa0d2740
@ -236,7 +236,7 @@ class SimpleCommandMap implements CommandMap{
|
|||||||
try{
|
try{
|
||||||
$target->execute($sender, $sentCommandLabel, $args);
|
$target->execute($sender, $sentCommandLabel, $args);
|
||||||
}catch(InvalidCommandSyntaxException $e){
|
}catch(InvalidCommandSyntaxException $e){
|
||||||
$sender->sendMessage(new TranslationContainer("commands.generic.usage", [$target->getUsage()]));
|
$sender->sendMessage($this->server->getLanguage()->translateString("commands.generic.usage", [$target->getUsage()]));
|
||||||
}catch(\Throwable $e){
|
}catch(\Throwable $e){
|
||||||
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.generic.exception"));
|
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.generic.exception"));
|
||||||
$this->server->getLogger()->critical($this->server->getLanguage()->translateString("pocketmine.command.exception", [$commandLine, (string) $target, $e->getMessage()]));
|
$this->server->getLogger()->critical($this->server->getLanguage()->translateString("pocketmine.command.exception", [$commandLine, (string) $target, $e->getMessage()]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user