Localize messages for /op and /deop

This commit is contained in:
Dylan K. Taylor
2021-08-26 13:29:31 +01:00
parent 4189fbdaef
commit 47120022c2
5 changed files with 13 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class DeopCommand extends VanillaCommand{
$sender->getServer()->removeOp($name);
if(($player = $sender->getServer()->getPlayerExact($name)) !== null){
$player->sendMessage(TextFormat::GRAY . "You are no longer op!");
$player->sendMessage(KnownTranslationFactory::commands_deop_message()->prefix(TextFormat::GRAY));
}
Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_deop_success($name));

View File

@ -61,7 +61,7 @@ class OpCommand extends VanillaCommand{
$sender->getServer()->addOp($name);
if(($player = $sender->getServer()->getPlayerExact($name)) !== null){
$player->sendMessage(TextFormat::GRAY . "You are now op!");
$player->sendMessage(KnownTranslationFactory::commands_op_message()->prefix(TextFormat::GRAY));
}
Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_op_success($name));
return true;