use Chat::formatMessage in Commands-namespace

This commit is contained in:
Alexander Nell
2020-05-26 21:56:00 +02:00
parent a311dcdbd9
commit 1d0215df52
2 changed files with 36 additions and 23 deletions

View File

@ -352,7 +352,12 @@ class CommandManager implements CallbackListener, UsageInformationAble {
if (!$this->isCommandEnabled($command, $isAdminCommand)) {
$prefix = $isAdminCommand ? '//' : '/';
$this->maniaControl->getChat()->sendError('The command $<$fff'.$prefix.$command.'$> is currently disabled!', $player);
$message = $this->maniaControl->getChat()->formatMessage(
'The command %s%s is currently disabled!',
$prefix,
$command
);
$this->maniaControl->getChat()->sendError($message, $player);
return;
}