Use Chat::formatMessage in Server/*

This commit is contained in:
Alexander Nell
2020-06-02 17:30:30 +02:00
parent 5717589588
commit 9abadac932
5 changed files with 159 additions and 77 deletions

View File

@ -172,6 +172,10 @@ class VoteRatiosMenu implements CallbackListener, ConfiguratorMenu, TimerListene
* @param string $commandName
*/
private function sendInvalidValueError(Player $player, $commandName) {
$this->maniaControl->getChat()->sendError("Invalid Value given for '{$commandName}'!", $player);
$message = $this->maniaControl->getChat()->formatMessage(
'Invalid Value given for %s!',
$commandName
);
$this->maniaControl->getChat()->sendError($message, $player);
}
}