mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Command: remove unnecessary branching in broadcastCommandMessage()
this problem is handled automatically now that nested translations are supported.
This commit is contained in:
parent
4748b0db37
commit
db90b40bdd
@ -232,11 +232,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){
|
||||
$result = $message->format("[" . $source->getName() . ": ", "]");
|
||||
}else{
|
||||
$result = KnownTranslationFactory::chat_type_admin($source->getName(), $message);
|
||||
}
|
||||
$result = KnownTranslationFactory::chat_type_admin($source->getName(), $message);
|
||||
$colored = $result->prefix(TextFormat::GRAY . TextFormat::ITALIC);
|
||||
|
||||
if($sendToSource and !($source instanceof ConsoleCommandSender)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user