mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +00:00
Command: Assume that TranslationContainer->getText() returns a valid translation key
there's no reason for it not to be.
This commit is contained in:
parent
483c16cc41
commit
d30371be11
@ -234,7 +234,7 @@ abstract class Command{
|
||||
public static function broadcastCommandMessage(CommandSender $source, TranslationContainer|string $message, bool $sendToSource = true) : void{
|
||||
$users = $source->getServer()->getBroadcastChannelSubscribers(Server::BROADCAST_CHANNEL_ADMINISTRATIVE);
|
||||
if($message instanceof TranslationContainer){
|
||||
$formatted = "[" . $source->getName() . ": " . ($source->getLanguage()->get($message->getText()) !== $message->getText() ? "%" : "") . $message->getText() . "]";
|
||||
$formatted = "[" . $source->getName() . ": %" . $message->getText() . "]";
|
||||
|
||||
$result = new TranslationContainer($formatted, $message->getParameters());
|
||||
$colored = new TranslationContainer(TextFormat::GRAY . TextFormat::ITALIC . $formatted, $message->getParameters());
|
||||
|
Loading…
x
Reference in New Issue
Block a user